AttributeInfo::GetArgumentValueAs Method (IServiceProvider^, Int32, Type^)

 

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

Namespace:   System.Workflow.ComponentModel.Compiler
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public:
Object^ GetArgumentValueAs(
	IServiceProvider^ serviceProvider,
	int argumentIndex,
	Type^ requestedType
)

Parameters

serviceProvider
Type: System::IServiceProvider^

The IServiceProvider helping this operation.

argumentIndex
Type: System::Int32

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

requestedType
Type: System::Type^

The Type of the argument.

Return Value

Type: System::Object^

An Object cast to the requested type.

Exception Condition
ArgumentException

argumentIndex is out of range of the argument collection.

ArgumentNullException

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

.NET Framework
Available since 3.0
Return to top
Show: