PostSharp SDK 6.10 / / Class Reference / 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

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

The LocalVariableDeclaration type exposes the following members.

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.
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().)
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