TryDeleteIndex Method

DynamicObject.TryDeleteIndex Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides the implementation for operations that delete an object by index. This method is not intended for use in C# or Visual Basic.

Namespace:  System.Dynamic
Assembly:  System.Core (in System.Core.dll)

'Declaration
Public Overridable Function TryDeleteIndex ( _
	binder As DeleteIndexBinder, _
	indexes As Object() _
) As Boolean

Parameters

binder
Type: System.Dynamic.DeleteIndexBinder
Provides information about the deletion.
indexes
Type: System.Object ()
The indexes to be deleted.

Return Value

Type: System.Boolean
true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.)

Classes derived from the DynamicObject class can override this method to specify how a value that has a specified index should be deleted. When the method is not overridden, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.)

C# and Visual Basic compilers never emit code to use this method because they do not support this kind of operation. This method is intended for languages that support syntax for deleting objects by index, such as del sampleObject[1,2] in Python.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft