![]() |
VOOZH | about |
SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based indexing). This comes under System.Collections namespace. SortedList.ContainsValue(Object) method is used to check whether a SortedList object contains a specific value or not.
Properties:
Syntax :
public virtual bool ContainsValue (object value);
Here, value is the value to locate in the SortedList object and it can be null.
Return Value: This method returns True if the SortedList object contains an element with the specified value, otherwise it returns False.
Below programs illustrate the use of SortedList.ContainsValue(Object) Method:
Example 1:
False
Example 2:
True
Note:
Reference: