In this article I discuss read-only automatic properties. I am going to cover how automatic properties have changed over the releases of C# and along the way show how much more concise the code becomes. Automatic Properties Ever since C# 3.0 came out we had the ability to define automatic properties. Gone were the days […]
Tag: C#6
String Interpolation
For years we have all used string.Format, it was one of those constructs that I thought “oh wow”, when I first started using the .Net Framework back in 2004. One of my colleagues at the time remarked “Its sweet, isn’t it?”, I guess we were easily amused back then? In C# 6 we saw the […]
nameof Operator
The nameof operator was introduced in C# 6. But before I discuss what the nameof operator is for, I would like to show what life was like before the nameof operator. Life before the nameof operator So back in C# 2, we might have the following code in our constructor: We would have used magic […]