DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

IsNullOrEmpty Function Of String

03.27.2012
| 3097 views |
  • submit to reddit
        IsNullOrEmpty function of string

        string stringS = null;
	if (string.IsNullOrEmpty(stringS))
	{
	    Console.WriteLine("It is empty or Null");
	}
	else
	{
	    Console.WriteLine("Not empty");
	}