Stack.Contains Method |
System.Collections.Stack
stackvariable .Contains( obj )
The value to search for in the stack
Boolean ( True or False ) indicating whether obj is found in the stack
Returns a Boolean indicating whether a given element (Object) is somewhere in the stack
obj must correspond exactly to an item in the stack for the method to return True .
String comparison is case sensitive and is not affected by the setting of Option Compare .
The Contains method searches the stack sequentially. In other words, its performance is inversely proportional to the number of items in the stack.
In comparing objects in the stack with obj , the Contains method in turn calls the BCL's Object.Equals method to perform the comparison. The Equals method returns True if two object instances are the same instance.