Thursday, December 17, 2009

Check String For Null

It's easy to forget but C# has a handy method to check if a string is null or empty:

If(!String.IsNullOrEmpty(str))
...do something

No comments:

Post a Comment