Tag: c#

Don’t Repeat Yourself x3

Don’t Repeat Yourself. DRY. It’s an oft repeated axiom among software developers but do we apply it broadly enough? Where we do apply it, do we apply it too aggressively? Today I’ll look at this fine old acronym three different ways: Avoid repeating code, Avoid making the same decisions, and avoid doing work over again.

Continue reading
No comments

Finally: Proper Exception Assertion in MSTest

As part of the overhaul of everything Visual Studio and .Net Core, there is an overhauled testing framework. Microsoft has been informally calling the MSTest V2. The most exciting part of this is the fact that we’ve finally have Assert.ThrowsException and its async counterpart Assert.ThrowsExceptionAsync as part of the framework. Unfortunately, MS didn’t completely abandon […]

Local Functions in C# 7

In my last post, I briefly mentioned the new C# feature known as local functions. I’ll write a bit about them here to get the word out a bit more and give me a reason to spend more time with them.

One comment