Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

ReadOnlyListBase<(Of <(<'T>)>)>..::..Contains Method

Determines if the list contains any item that compares equal to item. The implementation simply checks whether IndexOf(item) returns a non-negative value.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public bool Contains(
	T item
)
Public Function Contains ( _
	item As T _
) As Boolean
public:
bool^ Contains(
	T item
)

Parameters

item
Type: T
The item to search for.

Return Value

True if the list contains an item that compares equal to item.

Remarks


Equality in the list is determined by the default sense of equality for T. If T implements IComparable<T>, the Equals method of that interface is used to determine equality. Otherwise, Object.Equals is used to determine equality.