Partilhar via


Método SfcReferenceCollection<K, T, S>.TryGetValue

Gets the value associated with the specified key.

Namespace:  Microsoft.SqlServer.Management.Sdk.Sfc
Assembly:  Microsoft.SqlServer.Management.Sdk.Sfc (em Microsoft.SqlServer.Management.Sdk.Sfc.dll)

Sintaxe

'Declaração
Public Function TryGetValue ( _
    key As K, _
    <OutAttribute> ByRef value As T _
) As Boolean
'Uso
Dim instance As SfcReferenceCollection 
Dim key As K
Dim value As T
Dim returnValue As Boolean 

returnValue = instance.TryGetValue(key, _
    value)
public bool TryGetValue(
    K key,
    out T value
)
public:
virtual bool TryGetValue(
    K key, 
    [OutAttribute] T% value
) sealed
abstract TryGetValue : 
        key:'K * 
        value:'T byref -> bool  
override TryGetValue : 
        key:'K * 
        value:'T byref -> bool
public final function TryGetValue(
    key : K, 
    value : T
) : boolean

Parâmetros

  • key
    Tipo: K
    The key of the value to get.
  • value
    Tipo: T%
    When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter.

Valor de retorno

Tipo: System.Boolean
true if the collection contains an element with the specified key; otherwise, false.

Implementa

IReadOnlyDictionary<K, T>.TryGetValue(K, T%)

Consulte também

Referência

SfcReferenceCollection<K, T, S> Classe

Namespace Microsoft.SqlServer.Management.Sdk.Sfc