There can be only one return; 0 RLY?

My opinions and choices on style of coding evolves and changes over time. By blogging about this now, I can refer back later when I change my mind. I can also elicit the opinions of others to influence me to change my ways if I happen to be wrong and…

In C#, your structs should be immutable.

I wrote some code. It was simple code. I had a collection. I iterated over the collection and updated the values. I did this several times in an outer loop. The code didn't work. Why didn't it work? My collection was an array of Structs. When I pulled an item…

Migrating onto dotnet tools 1.0.0

Since Visual Studio 2017 is out, and we have a 1.0.0 tools release for .Net Core, I'm going to try and migrate a simple project from the pre-release tooling, onto the new tooling. The biggest difference is that instead of using a project.json file, the new tooling…

.Net Core Series - Publishing Portable Applications

This is a series on the new .Net Core bits. Getting Started What's in the box Using Multiple Projects Testing NuGet Multi-targeting Publishing Portable Applications <=(We are here) Self-contained Applications We can now take everything we have learned and start publishing our applications. Luckily, there is a command for…

How to Constructors

Constructors for services are a really handy way to pass in configuration, variation and dependencies. Here are some ways I have learned to use Constructors and some ideas on testing. What shouldn't be in a Constructor Execution. Any complex execution of code should not be in a constructor. This includes…

.Net Core Series - Multi-targeting

This is a series on the new .Net Core bits. Getting Started What's in the box Using Multiple Projects Testing NuGet Multi-targeting <=(We are here) Publishing Portable Applications Self-contained Applications Last time we learned how to package our libraries as NuGet packages. But it was only targeting netstandard1.6,…

.Net Core Series - NuGet

This is a series on the new .Net Core bits. Getting Started What's in the box Using Multiple Projects Testing NuGet <=(We are here) Multi-targeting Publishing Portable Applications Self-contained Applications Let's set aside Application packing for later, and focus our attention on NuGet. Our Demo library Again we will…

.Net Core Series - Testing

This is a series on the new .Net Core bits. Getting Started What's in the box Using Multiple Projects Testing <=(We are here) NuGet Multi-targeting Publishing Portable Applications Self-contained Applications We want to be able to test our application code that we build. Let's get started. The Setup Like…