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.

适用于