Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
12c (12.1.3.0.0)
E47892-01
Determines whether an element is in the collection.

Namespace: Tangosol.Util
Assembly: Coherence (in Coherence.dll) Version: 12.1.3.0 (12.1.3.0)

Syntax

C#
public static bool Contains(
	ICollection col,
	Object obj
)

Parameters

col
Type: System.Collections..::..ICollection
Collection where element is searched for.
obj
Type: System..::..Object
The object to locate in the collection.

Return Value

true if the element is found in the collection, false otherwise.

Remarks

This method allows us to determine if an element is in any collection type from the System.Collections namespace since ICollection does not have method "Contains" defined in its interface. When collection is IDictionary object should be DictionaryEntry.

Exceptions

ExceptionCondition
System..::..NotSupportedException If col's type is an unknown collection type.

See Also