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: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic override bool Contains(
T item
)
public:
virtual bool Contains(
T item
) override
Parameters
- item
- Type: T
The item to search for.
Return Value
Type:
BooleanTrue if the list contains an item that compares equal to
item.
Implements
ICollectionTContains(T)ICollectionTContains(T)
RemarksEquality 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.
See Also