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”);
}
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”);
}