ComponentOne Xamarin.Android
InsertAsync<T> Method (ICollectionViewEx)


C1.CollectionView Assembly > C1.CollectionView Namespace > ICollectionViewEx Class : InsertAsync<T> Method
The collection view.
The index where the item will be inserted.
The item to be inserted.
Inserts the specified item at the specified index in the collection.
Syntax
'Declaration
 
<AsyncStateMachineAttribute(C1.CollectionView.ICollectionViewEx/d__55`1)> 
<ExtensionAttribute()> 
Public Shared Function InsertAsync(Of T As Class)( _ 
   ByVal collectionView As ICollectionView(Of T), _ 
   ByVal index As Integer, _ 
   ByVal item As T _ 
) As Task(Of Integer)
'Usage
 
Dim collectionView As ICollectionView(Of T)
Dim index As Integer
Dim item As T
Dim value As Task(Of Integer)
 
value = ICollectionViewEx.InsertAsync(Of T)(collectionView, index, item)
[AsyncStateMachine(C1.CollectionView.ICollectionViewEx/d__55`1)] 
[Extension()] 
public static Task<int> InsertAsync<T>( 
   ICollectionView<T> collectionView, 
   int index, 
   T item 
) 
where T: class

Parameters

collectionView
The collection view.
index
The index where the item will be inserted.
item
The item to be inserted.

Type Parameters

T
See Also

Reference

ICollectionViewEx Class
ICollectionViewEx Members