LocalBuilder.LocalType Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the type of the local variable.
Assembly: mscorlib (in mscorlib.dll)
The following code sample illustrates the use of LocalType. This code is part of a larger example for the LocalBuilder class.
// Create local variables named myString and myInt. LocalBuilder myLB1 = myMethodIL.DeclareLocal(typeof(string)); outputBlock.Text += String.Format("local 'myString' type is: {0}\n", myLB1.LocalType); LocalBuilder myLB2 = myMethodIL.DeclareLocal(typeof(int)); outputBlock.Text += String.Format("local 'myInt' type is: {0}\n", myLB2.LocalType);
Show: