Partager via


TransactionContext.TryGetValue<T> Method

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

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

Syntax

'Declaration
Public Function TryGetValue(Of T) ( _
    key As Object, _
    <OutAttribute> ByRef value As T _
) As Boolean
public bool TryGetValue<T>(
    Object key,
    out T value
)
public:
generic<typename T>
bool TryGetValue(
    Object^ key, 
    [OutAttribute] T% value
)
member TryGetValue : 
        key:Object * 
        value:'T byref -> bool
JScript does not support generic types or methods.

Type Parameters

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

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.

.NET Framework Security

See Also

Reference

TransactionContext Class

Microsoft.VisualStudio.Modeling Namespace