Share via


ReferenceContext.TryGetValue<T> Method (Object, T)

 

Lookup the value associated with a specified key in the context.

Namespace:   Microsoft.VisualStudio.Modeling.Integration
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0.dll)

Syntax

public bool TryGetValue<T>(
    object key,
    out T value
)
public:
generic<typename T>
bool TryGetValue(
    Object^ key,
    [OutAttribute] T% value
)
member TryGetValue<'T> : 
        key:Object *
        value:'T byref -> bool
Public Function TryGetValue(Of T) (
    key As Object,
    <OutAttribute> ByRef value As T
) As Boolean

Parameters

  • value
    Type: T

    Receives the value associated with the specified key, or the default value for T if the key is not found

Return Value

Type: System.Boolean

Whether or not the context contained a value with the specified key.

Type Parameters

  • T
    The expected type of the value associated with the specified key

See Also

ReferenceContext Class
Microsoft.VisualStudio.Modeling.Integration Namespace

Return to top