mscorlib(4.0.0.0) API with additions
LocalVariableInfo.cs
2 
3 namespace System.Reflection
4 {
6  [ComVisible(true)]
7  [__DynamicallyInvokable]
8  public class LocalVariableInfo
9  {
10  private RuntimeType m_type;
11 
12  private int m_isPinned;
13 
14  private int m_localIndex;
15 
18  [__DynamicallyInvokable]
19  public virtual Type LocalType
20  {
21  [__DynamicallyInvokable]
22  get
23  {
24  return m_type;
25  }
26  }
27 
31  [__DynamicallyInvokable]
32  public virtual bool IsPinned
33  {
34  [__DynamicallyInvokable]
35  get
36  {
37  return m_isPinned != 0;
38  }
39  }
40 
43  [__DynamicallyInvokable]
44  public virtual int LocalIndex
45  {
46  [__DynamicallyInvokable]
47  get
48  {
49  return m_localIndex;
50  }
51  }
52 
54  [__DynamicallyInvokable]
55  protected LocalVariableInfo()
56  {
57  }
58 
61  [__DynamicallyInvokable]
62  public override string ToString()
63  {
64  string text = LocalType.ToString() + " (" + LocalIndex + ")";
65  if (IsPinned)
66  {
67  text += " (pinned)";
68  }
69  return text;
70  }
71  }
72 }
virtual bool IsPinned
Gets a T:System.Boolean value that indicates whether the object referred to by the local variable is ...
Definition: __Canon.cs:3
override string ToString()
Returns a String representing the name of the current Type.
Definition: Type.cs:2788
override string ToString()
Returns a user-readable string that describes the local variable.
virtual Type LocalType
Gets the type of the local variable.
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
Discovers the attributes of a local variable and provides access to local variable metadata.
LocalVariableInfo()
Initializes a new instance of the T:System.Reflection.LocalVariableInfo class.
virtual int LocalIndex
Gets the index of the local variable within the method body.