KeyDictionary.TryGetValue MethodKeyDictionary.TryGetValue MethodKeyDictionary::TryGetValue Method

Gets the value with the specified key.

Syntax

Public Function TryGetValue( _
    key As System.Xml.XmlQualifiedName, _
    <Out>value As ByRef IList(Of Key) _
) As Boolean
public bool TryGetValue(
    System.Xml.XmlQualifiedName key,
    out IList<Key> value
)
public:
virtual bool TryGetValue(
    System.Xml::XmlQualifiedName^ key, 
    [Out] IList<Key^>^% value
) sealed
 

Parameters

key

Type: System.Xml.XmlQualifiedNameSystem.Xml.XmlQualifiedNameSystem.Xml::XmlQualifiedName^

The name of the key whose type is to be returned.

value

Type: out System.Collections.Generic.IList<T>ByRef System.Collections.Generic.IList(Of T)System.Collections.Generic::IList<T>^%

When this method returns, contains the type of the specified key, if it is set; otherwise, null a null reference (Nothing in Visual Basic) nullptr.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the KeyDictionaryKeyDictionaryKeyDictionary contains the specified key, otherwise falseFalsefalse

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionkey is null a null reference (Nothing in Visual Basic) nullptr.