iswarya chandran

iswarya chandran

  • NA
  • 67
  • 19.3k

Unassigned Local Variable

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