Upravit

Sdílet prostřednictvím


AttributeInfo.GetArgumentValueAs(IServiceProvider, Int32, Type) Method

Definition

Gets the argument for this instance, based on type and index.

public:
 System::Object ^ GetArgumentValueAs(IServiceProvider ^ serviceProvider, int argumentIndex, Type ^ requestedType);
public object GetArgumentValueAs (IServiceProvider serviceProvider, int argumentIndex, Type requestedType);
member this.GetArgumentValueAs : IServiceProvider * int * Type -> obj
Public Function GetArgumentValueAs (serviceProvider As IServiceProvider, argumentIndex As Integer, requestedType As Type) As Object

Parameters

serviceProvider
IServiceProvider

The IServiceProvider helping this operation.

argumentIndex
Int32

The integer index of the requested argument in the collection of arguments.

requestedType
Type

The Type of the argument.

Returns

An Object cast to the requested type.

Exceptions

argumentIndex is out of range of the argument collection.

requestedType is a null reference (Nothing in Visual Basic).

Applies to