📜  c# if isset - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:03.390000             🧑  作者: Mango

代码示例1
// 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";
}