by Syska
22. April 2010 00:39
Instead of doing
1: if(s == null || s.Length == 0)
2: return;
I normally do
1: if(string.IsNullOrEmpty(s))
2: return;
So, as I would normally do, I started typing: string.Is and intellisense showed me an nice addition to the normal string class in .NET 4.0 … NICE :-).
1: if (string.IsNullOrWhiteSpace(s))
2: return;
Its the little things in life that counts, this saved my evening after messing around trying to move all my projects from SVN to TFS 2010.
7dd1d3ed-7282-4f0e-a6ff-c8a4356b2e5f|2|4.0
Tags: