5
Reply

Unassigned Local Variable

iswarya chandran

iswarya chandran

Jul 31 2013 6:41 AM
974
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)