C#.net Null and blank values

Posted by Jonathan D on Stack Overflow See other posts from Stack Overflow or by Jonathan D
Published on 2010-05-25T08:58:14Z Indexed on 2010/05/25 9:01 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

What's the best way of writing robust code so that a variable can be checked for null and blank.

e.g.

string a;

if((a != null) && (a.Length() > 0))
{
    //do some thing with a
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET