ArgIterator ArgIterator ArgIterator ArgIterator Struct

定義

表示可變長度的引數清單,也就是說,使用引數變數的函式參數。Represents a variable-length argument list; that is, the parameters of a function that takes a variable number of arguments.

public value class ArgIterator
public struct ArgIterator
type ArgIterator = struct
Public Structure ArgIterator
繼承
ArgIteratorArgIteratorArgIteratorArgIterator

備註

撰寫編譯器的開發人員會ArgIterator使用結構來列舉引數清單中的強制和選擇性引數。Developers who write compilers use the ArgIterator structure to enumerate the mandatory and optional arguments in an argument list. ArgIterator結構對於編譯器以外的應用程式而言, 通常並不實用。The ArgIterator structure is not generally useful for applications other than compilers.

ArgIterator結構中的功能通常會隱藏在特定程式設計語言的語法中。The functionality in the ArgIterator structure is typically hidden in the syntax of a specific programming language. 例如, 在程式C++設計語言中, 您可以在引數清單的結尾指定省略號 ("..."), 以宣告可變長度的引數清單。For example, in the C++ programming language you declare a variable-length argument list by specifying an ellipsis ("...") at the end of the argument list. ArgIterator開發語言未提供直接支援來存取可變長度參數時, 此結構很有用。The ArgIterator structure is useful primarily when a development language does not provide direct support for accessing variable-length parameters.

建構函式

ArgIterator(RuntimeArgumentHandle) ArgIterator(RuntimeArgumentHandle) ArgIterator(RuntimeArgumentHandle) ArgIterator(RuntimeArgumentHandle)

使用指定的引數清單,初始化 ArgIterator 結構的新執行個體。Initializes a new instance of the ArgIterator structure using the specified argument list.

ArgIterator(RuntimeArgumentHandle, Void*) ArgIterator(RuntimeArgumentHandle, Void*) ArgIterator(RuntimeArgumentHandle, Void*) ArgIterator(RuntimeArgumentHandle, Void*)

使用指定的引數清單和指向清單項目的指標,初始化 ArgIterator 結構的新執行個體。Initializes a new instance of the ArgIterator structure using the specified argument list and a pointer to an item in the list.

方法

End() End() End() End()

結束處理由這個執行個體代表的可變長度的引數清單。Concludes processing of the variable-length argument list represented by this instance.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

不支援這個方法,而且永遠會擲回 NotSupportedExceptionThis method is not supported, and always throws NotSupportedException.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個物件的雜湊碼。Returns the hash code of this object.

GetNextArg() GetNextArg() GetNextArg() GetNextArg()

傳回可變長度引數清單中的下一個引數。Returns the next argument in a variable-length argument list.

GetNextArg(RuntimeTypeHandle) GetNextArg(RuntimeTypeHandle) GetNextArg(RuntimeTypeHandle) GetNextArg(RuntimeTypeHandle)

傳回可變長度引數清單中的具有指定型別的下一個引數。Returns the next argument in a variable-length argument list that has a specified type.

GetNextArgType() GetNextArgType() GetNextArgType() GetNextArgType()

傳回下一個引數的型別。Returns the type of the next argument.

GetRemainingCount() GetRemainingCount() GetRemainingCount() GetRemainingCount()

傳回引數清單中剩餘的引數數目。Returns the number of arguments remaining in the argument list.

適用於