Share via


IAnnotationDictionary.TryGetValue<T> Method (Object, T%)

Gets the object that has the specified type and is associated with the specified key.

Namespace:  Microsoft.VisualStudio.SharePoint
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Function TryGetValue(Of T) ( _
    key As Object, _
    <OutAttribute> ByRef value As T _
) As Boolean
bool TryGetValue<T>(
    Object key,
    out T value
)

Type Parameters

  • T
    The type of the object to get.

Parameters

  • key
    Type: Object

    The key of the object to get.

  • value
    Type: T%

    When this method returns, contains the object associated with the specified key, if the key is found and the object has the type T; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Return Value

Type: Boolean
true if the dictionary contains an object with the specified key and the object has the type T; otherwise, false.

.NET Framework Security

See Also

Reference

IAnnotationDictionary Interface

TryGetValue Overload

Microsoft.VisualStudio.SharePoint Namespace