[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.RemoveAsync

RemoveAsync Method

RemoveAsync<T>(IDataCollection<T>, int, CancellationToken)

Removes the item at the specified index from the collection.

Declaration
[UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "The members of ISupportEditing<> class were explicitly annotated so this method can use them safely.")]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, typeof(ISupportEditing<>))]
public static Task RemoveAsync<T>(this IDataCollection<T> dataCollection, int index, CancellationToken cancellationToken = default) where T : class?
<UnconditionalSuppressMessage("Trimming", "IL2075", Justification:="The members of ISupportEditing<> class were explicitly annotated so this method can use them safely.")>
<DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, GetType(ISupportEditing(Of )))>
Public Shared Function RemoveAsync(Of T As Class)(dataCollection As IDataCollection(Of T), index As Integer, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

int index

The index of the item that will be removed.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task
Type Parameters
Name Description
T

RemoveAsync<T>(IDataCollection<T>, int)

Removes the item at the specified index from the collection.

Declaration
public static Task RemoveAsync<T>(this IDataCollection<T> dataCollection, int index) where T : class?
Public Shared Function RemoveAsync(Of T As Class)(dataCollection As IDataCollection(Of T), index As Integer) As Task
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

int index

The index of the item that will be removed.

Returns
Type Description
Task
Type Parameters
Name Description
T