📅  最后修改于: 2022-03-11 14:49:03.390000             🧑  作者: Mango
// check if variable set or not
if(variable != null)
{
Console.WriteLine("variable is set");
}
else
{
Console.WriteLine("variable is not set");
variable = "This variable is now set";
}