.NET Framework 4.0 Newbie : String.IsNullOrWhiteSpace

.NET Framework 4.0 Newbie : String.IsNullOrWhiteSpace

  • Comments 0

In .NET Framework 4.0 we have String.IsNullOrWhiteSpace.

String sData = " ";

 

if (String.IsNullOrWhiteSpace(sData))

{

    Console.WriteLine("Nothing to do");

}

 

This would help us to determine whether to work with a string without calling additional Trim() method.

Namoskar!!!

Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post