ArgIterator Structure

Represents a variable-length argument list; that is, the parameters of a function that takes a variable number of arguments.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public value class ArgIterator

The ArgIterator type exposes the following members.

  NameDescription
Public methodArgIterator(RuntimeArgumentHandle)Initializes a new instance of the ArgIterator structure using the specified argument list.
Public methodArgIterator(RuntimeArgumentHandle, Void*)Initializes a new instance of the ArgIterator structure using the specified argument list and a pointer to an item in the list.
Top

  NameDescription
Public methodEndConcludes processing of the variable-length argument list represented by this instance.
Public methodEqualsThis method is not supported, and always throws NotSupportedException. (Overrides ValueType::Equals(Object).)
Public methodGetHashCodeReturns the hash code of this object. (Overrides ValueType::GetHashCode().)
Public methodGetNextArg()Returns the next argument in a variable-length argument list.
Public methodGetNextArg(RuntimeTypeHandle)Returns the next argument in a variable-length argument list that has a specified type.
Public methodGetNextArgTypeReturns the type of the next argument.
Public methodGetRemainingCountReturns the number of arguments remaining in the argument list.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

Developers who write compilers use the ArgIterator structure to enumerate the mandatory and optional arguments in an argument list. The ArgIterator structure is not generally useful for applications other than compilers.

The functionality in the ArgIterator structure is typically hidden in the syntax of a specific programming language. 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. The ArgIterator structure is useful primarily when a development language does not provide direct support for accessing variable-length parameters.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft