NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

SortedList.Contains

Determines if the SortedList contains a specific key.

[Visual Basic]
Overridable Public Function Contains( _
   ByVal key As Object _
) As Boolean
[C#]
public virtual bool Contains(
   object key
);
[C++]
public: virtual bool Contains(
   Object* key
);
[JScript]
public function Contains(
   key : Object
) : Boolean;

Parameters

key
The key to search for in the SortedList.

Return Value

true if the SortedList contains an element with the specified key; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException key is a null reference (in Visual Basic Nothing).

Remarks

This method can be overridden by a derived class.

This method uses a binary search algorithm; therefore, the average execution time is proportional to Log2 (size), where size is the size of the SortedList.

This method implements the IDictionary interface. It behaves exactly as ContainsKey.

See Also

SortedList Class | SortedList Members | System.Collections Namespace | ContainsKey | IndexOfKey