samedi 27 mai 2017

How can i use a var in c# over {}

How can i use a var in c# over {} like:

if
{
   var test;
   while
   {
      test = "12345";
      //test is defined
   } 
   var test2 = test;
   //test is undefined
}

I do not understand it.

Aucun commentaire:

Enregistrer un commentaire