Asp.net string Check null or empty string

To Check null or empty string  one trick is given below

string str = “Demo”;
str = “”;

if (Convert.ToString((object)str) != string.Empty)
{
Response.Write(“Null String”);
}

Leave a comment