DynamicScriptObject.TryGetIndex Method (GetIndexBinder, Object[], Object)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets an indexed value from the script object by using the first index value from the indexes collection.

Namespace:   System.Windows.Interop
Assembly:  PresentationFramework (in PresentationFramework.dll)

public override bool TryGetIndex(
	GetIndexBinder binder,
	object[] indexes,
	out object result
)

Parameters

binder
Type: System.Dynamic.GetIndexBinder

The binder provided by the call site.

indexes
Type: System.Object[]

The index to be retrieved.

result
Type: System.Object

The method result.

Return Value

Type: System.Boolean

Always returns true.

Exception Condition
ArgumentNullException

binder is null.

-or-

indexes is null.

ArgumentException

The length of indexes is not equal to 1.

ArgumentOutOfRangeException

The first indexes value is null.

MissingMemberException

The member does not exist.

The TryGetIndex method throws an exception if an invalid access is attempted.

.NET Framework
Available since 4.0
Return to top
Show: