Redigera

Dela via


NameScope.Contains(KeyValuePair<String,Object>) Method

Definition

Determines whether the collection contains a specified item.

public:
 virtual bool Contains(System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^> item);
public bool Contains (System.Collections.Generic.KeyValuePair<string,object> item);
abstract member Contains : System.Collections.Generic.KeyValuePair<string, obj> -> bool
override this.Contains : System.Collections.Generic.KeyValuePair<string, obj> -> bool
Public Function Contains (item As KeyValuePair(Of String, Object)) As Boolean

Parameters

item
KeyValuePair<String,Object>

The item to find in the collection, specified as a KeyValuePair<TKey,TValue> (key is String, value is Object).

Returns

true if the specified KeyValuePair<TKey,TValue> identifies an existing mapping in this NameScope . false if the specified KeyValuePair<TKey,TValue> does not exist in the current NameScope.

Implements

Exceptions

key is null.

Remarks

Generally you are only interested in whether a name is already defined in the XAML namescope, and what object reference value it is mapped to is immaterial. For this scenario, you can call ContainsKey instead.

Applies to