Strings get even better with .NET 4
Handling text has always been the bane of my programming career. Starting off as a C developer forever tainted me when it comes to processing text; it’s difficult for me to not cringe every time I think of having to do text parsing. String manipulation in .NET was a pleasant surprise for me – when I started with C# I found I suddenly lost my urge to wince every time I had to deal with text input, and no longer was I itching to jump over to a loosely typed language just for handling string manipulation. The System.String class in .NET provided most of the ease of use I missed in C (and even C++).
However, even in .NET, there have been little annoyances when dealing with the String class. Version 4 of the .NET framework, again, adds some functionality to simplify day to day programming tasks. It’s really nice to see that the base class library team is giving some attention to the core, very common classes. Here is a summary of the changes to the String class, and why they help.
Long overdue Enum goodness in .NET 4
The more I investigate the changes in Version 4 of the .NET framework, the more I find little tweaks that just reduce the pain of day to day programming. For example, the System.Enum class is getting some extra methods that finally make day to day programming a bit simpler.
Lazy initialization in .NET 4 – Lazy<T>
A very common pattern in programming is the Lazy Initialization Pattern. Version 4 of the .NET Framework makes using this pattern very, very easy.