5
Answers

Unassigned Local Variable

iswarya chandran

iswarya chandran

11y
1.4k
1
Is it possible to check the unassigned local variable with if condition??

for eg;

string name;

try
{
name= (string)Session["user"];
}
catch {}

if(name==null)
{
//code we want

}

Answers (5)