Ok this is going to be a short one. We’ve seen how the Expression Bodied Auto Properties can simplify things a little bit. But, if that is possible, then what about other things with simple bodies? Turns out, Methods are fair game as well.
This is turning in to a fairly popular language change. Again, it’s not a significant change to how C# works, or how you write code, it’s essentially syntactic sugar that makes life just a little bit easier.
It lets us take code like this:
And turn it into code that looks like this:
It’s not a huge change. I wouldn’t go out and re-write production applications in order to make use of it. But, it will simplify things moving forward, and perhaps make things just a little more readable.
Also, some of the folks in the F# world seem to think this is a move towards a more “functional language” paradigm, and that this is a good thing. We shall see.