Creates an IndexedCollection<(Of <(<'T>)>)> based on the specified IBindingList data source.
Namespace:
C1.LiveLinqAssembly: C1.LiveLinq (in C1.LiveLinq.dll)
Syntax
C# |
---|
public static IndexedCollection<T> ToIndexed<T>( this IBindingList source ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function ToIndexed(Of T) ( _ source As IBindingList _ ) As IndexedCollection(Of T) |
Parameters
- source
- Type: System.ComponentModel..::..IBindingList
An IBindingList data source to represent as an IndexedCollection<(Of <(<'T>)>)>.
Type Parameters
- T
- The type of the elements in the collection.
Return Value
An IndexedCollection<(Of <(<'T>)>)> that contains the same elements as the IBindingList and enables indexing of that data source.Remarks
Use this method to index and query your existing data sources. The only requirements for the data source is that it implements the standard data binding interface IBindingList.
Note: Indexes created on the resulting IndexedCollection<(Of <(<'T>)>)> are owned by it and not by the original data source. Every ToIndexed() call creates a separate object that has its own separate indexes. Avoid calling ToIndexed() repeatedly for the same collection because it can increase the cost of maintaining indexes.