String.IsNullOrEmpty(string)
Back in days of yore you would need to do something like
if (String.Empty) || (string = "") || (string = null)
{
//do stuff
}
Now you can cover off all those in one hit with String.IsNullOrEmpty(string).
(And yeah, code probably is probably wrong because I try not to use them since upgrading from vb6/ .net 1.0, but you get the idea :) )
Friday, July 10, 2009
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.