DEV Community

Cover image for Best .NET Posts This Week: 17th January 2021
Sam Walpole
Sam Walpole

Posted on • Originally published at samwalpole.com

Best .NET Posts This Week: 17th January 2021

Here are some of the best .NET, C# and ASP NET posts from this week.

This Weeks Articles

My preferred .NET console stack

By Mattias Karlsson

An opinionated view on the boilerplate starting point of any .NET console application

A Practical Intro to Covariance and Contravariance in C#

By Vasil Kosturski

When defining a generic interface, have you received a hint from Resharper like “The type parameter T could be declared as covariant” (or “contravariant”)? If so, have you then blindly applied the proposed refactoring which decorates your generic parameter with the in or out keyword? I know I’ve done this a few times before deciding to dig deeper into what these terms actually mean and how they affect my type’s behavior. Type variance is one of the topics developers work with pretty much on a daily basis but don’t always understand it well.

Introduction to Test Driven Development (TDD) and AAA Testing using xUnit

By Sam Walpole

I'm not ashamed to admit that for a long time I avoided writing tests for my code. I saw it as something that took up precious time that I could have spent on "real" coding. However, after experiencing first-hand the headache caused from having to maintain production code with little-to-no tests, I've been convinced that writing tests really are worth your time. Too many times have I been bitten by hidden bugs, that could have easily been identified if the appropriate tests were in place.

You Might Also Like

"Ten++ Ways to Make Money as a Developer" eBook

I post mostly about full stack .NET and Vue web development. To make sure that you don't miss out on any posts, please follow this blog and subscribe to my newsletter. If you found this post helpful, please like it and share it. You can also find me on Twitter.

Top comments (0)