مشاركة عبر


SfcReferenceCollection<K, T, S>.TryGetValue Method

Gets the value associated with the specified key.

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

Syntax

'Declaration
Public Function TryGetValue ( _
    key As K, _
    <OutAttribute> ByRef value As T _
) As Boolean
'Usage
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

Parameters

  • key
    Type: K
    The key of the value to get.
  • value
    Type: 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.

Return Value

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

Implements

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

See Also

Reference

SfcReferenceCollection<K, T, S> Class

Microsoft.SqlServer.Management.Sdk.Sfc Namespace