Defines a single parameter in the current method. The type of each parameter is taken from its position (sequence) within the method's signature.
Defines a single variable in the current lexical scope.
[Visual Basic] Sub DefineLocalVariable( _ ByVal name As String, _ ByVal attributes As FieldAttributes, _ ByVal signature() As Byte, _ ByVal addrKind As SymAddressKind, _ ByVal addr1 As Integer, _ ByVal addr2 As Integer, _ ByVal addr3 As Integer, _ ByVal startOffset As Integer, _ ByVal endOffset As Integer _ ) [C#] void DefineLocalVariable( string name, FieldAttributes attributes, byte[] signature, SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset ); [C++] void DefineLocalVariable( String* name, FieldAttributes attributes, unsigned char* signature[], SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset ) = 0; [JScript] function DefineLocalVariable( name : String, attributes : FieldAttributes, signature : Byte[], addrKind : SymAddressKind, addr1 : int, addr2 : int, addr3 : int, startOffset : int, endOffset : int );
The startOffset and endOffset parameters are optional. If their value is 0, they are ignored and the variable is defined over the entire scope. If their value is non-zero, they must fall within the offsets of the current scope.
This can be called multiple times for a variable of the same name that has multiple homes throughout a scope. (Note: Start and end offsets must not overlap in such a case.)
If parameters were defined in the metadata for a specified method, you would not have to define them again with calls to this method. The symbol readers will have to be smart enough to check the normal metadata for these first, and then fall back to the symbol store.
ISymbolWriter Interface | ISymbolWriter Members | System.Diagnostics.SymbolStore Namespace