Joe Wood's Blog

Technology

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011


Navigation

Subscriptions



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 on Friday, June 17, 2005 12:13 PM by joewood





Powered by Dot Net Junkies, by Telligent Systems