PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Advisable­Keyed­Collection(TKey, TItem) Class / Advisable­Keyed­Collection(TKey, TItem) Methods / Advisable­Keyed­Collection(TKey, TItem).​Index­Of­Item Method

AdvisableKeyedCollection<TKey, TItem>.IndexOfItem Method

Searches for the specified object and returns the zero-based index of the first occurrence within the entire underlying collection.

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
protected override int IndexOfItem(
	TItem item


Type: TItem
The object to locate in the AdvisableCollection<T>. The value can be null for reference types.

Return Value

Type: Int32
The zero-based index of the first occurrence of item within the entire AdvisableCollection<T>, if found; otherwise, -1.
See Also