[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.ReplaceAsync

ReplaceAsync Method

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

Replaces the item at the specified index by the specified item.

Declaration
public static Task<int> ReplaceAsync<T>(this IDataCollection<T> dataCollection, int index, T item, CancellationToken cancellationToken = default) where T : class?
Public Shared Function ReplaceAsync(Of T As Class)(dataCollection As IDataCollection(Of T), index As Integer, item As T, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

int index

The index.

T item

The item.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<int>
Type Parameters
Name Description
T

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

Replaces the item at the specified index by the specified item.

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

The data collection.

int index

The index.

T item

The item.

Returns
Type Description
Task<int>
Type Parameters
Name Description
T