Joe Wood's Blog

Technology

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

Subscriptions



Friday, June 17, 2005 - Posts

VS 2005 Cool Feature #2 - String.NullOrEmpty

This one is simple, it allows you to test for null or empty strings in one static function:

string s = null;
string s2 = string.Empty;
string s3 = "";
if (string.IsNullOrEmpty(s) && string.IsNullOrEmpty(s2) && string.IsNullOrEmpty(s3)) Console.WriteLine("Works");

This is more for convenience than anything else.

posted Friday, June 17, 2005 12:13 PM by joewood with 1 Comments




Powered by Dot Net Junkies, by Telligent Systems