PostSharp SDK6.6//Post­Sharp.​Sdk.​Code­Model Namespace/Local­Variable­Declaration Class

LocalVariableDeclaration Class

Represents a local variable. Local variables are owned by method bodies (MethodBodyDeclaration).
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.CodeModel.Element
    PostSharp.Sdk.CodeModel.Declaration
      PostSharp.Sdk.CodeModel.LocalVariableDeclaration

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.6.3.0 (6.6.3.0)
Syntax
C#
public sealed class LocalVariableDeclaration : Declaration, 
	ICloneable, IPositioned

The LocalVariableDeclaration type exposes the following members.

Properties
  NameDescription
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyIsReadOnly
Determines whether the current variable is read-only.
Public propertyOrdinal
Gets the local variable ordinal.
Public propertyType
Gets or sets the local variable type.
Methods
  NameDescription
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of the current Element and all its children.
(Inherited from Element.)
Public methodClone
Clones the current instance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Remarks
A LocalVariableDeclaration it referenced by ordinal; it has no name. Positions are assigned to a name in lexical scopes. Lexical scopes are implemented by the InstructionBlock type and assignment of names to a local variable are done by the LocalVariableSymbol type.
See Also