言語

SymWriter.DefineLocalVariable メソッド

定義

現在の字句スコープで 1 つの変数を定義します。

public:
 override void DefineLocalVariable(System::String ^ name, System::Reflection::FieldAttributes attributes, cli::array <System::Byte> ^ signature, System::Diagnostics::SymbolStore::SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
public:
 virtual void DefineLocalVariable(System::String ^ name, System::Reflection::FieldAttributes attributes, cli::array <System::Byte> ^ signature, System::Diagnostics::SymbolStore::SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
public override void DefineLocalVariable(string name, System.Reflection.FieldAttributes attributes, byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
public virtual void DefineLocalVariable(string name, System.Reflection.FieldAttributes attributes, byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
abstract member DefineLocalVariable : string * System.Reflection.FieldAttributes * byte[] * System.Diagnostics.SymbolStore.SymAddressKind * int * int * int * int * int -> unit
override this.DefineLocalVariable : string * System.Reflection.FieldAttributes * byte[] * System.Diagnostics.SymbolStore.SymAddressKind * int * int * int * int * int -> unit
Public Overrides Sub DefineLocalVariable (name As String, attributes As FieldAttributes, signature As Byte(), addrKind As SymAddressKind, addr1 As Integer, addr2 As Integer, addr3 As Integer, startOffset As Integer, endOffset As Integer)
Public Overridable Sub DefineLocalVariable (name As String, attributes As FieldAttributes, signature As Byte(), addrKind As SymAddressKind, addr1 As Integer, addr2 As Integer, addr3 As Integer, startOffset As Integer, endOffset As Integer)

パラメーター

name
String

ローカル変数名。

attributes
FieldAttributes

FieldAttributes列挙子を使用して指定されたローカル変数属性。

signature
Byte[]

ローカル変数シグネチャ。

addrKind
SymAddressKind

addr1を使用したaddr2addr3、およびSymAddressKindのアドレスの種類。

addr1
Int32

ローカル変数仕様の最初のアドレス。

addr2
Int32

ローカル変数仕様の 2 番目のアドレス。

addr3
Int32

ローカル変数仕様の 3 番目のアドレス。

startOffset
Int32

変数の開始オフセット。 ゼロの場合、このパラメーターは無視され、変数はスコープ全体で定義されます。 0 以外の場合は、現在のスコープのオフセット内に含まれます。

endOffset
Int32

変数の終了オフセット。 ゼロの場合、このパラメーターは無視され、変数はスコープ全体で定義されます。 0 以外の場合は、現在のスコープのオフセット内に含まれます。

実装

注釈

startOffsetパラメーターと endOffset パラメーターは省略可能です。 値が 0 の場合は無視され、変数はスコープ全体で定義されます。 値が 0 以外の場合は、現在のスコープのオフセット内に収められます。

スコープ全体で異なるオフセット範囲で複数回発生する同じ名前の変数に対して、 DefineLocalVariable を複数回呼び出すことができます。 (この場合、開始オフセットと終了オフセットは重複してはなりません)。

適用対象