[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.IndexOf

IndexOf Method

IndexOf<T>(IDataCollection<T>, T)

Gets the index of the specified item.

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

The data collection.

T item

The item that will be searched.

Returns
Type Description
int
Type Parameters
Name Description
T