共用方式為


SfcReferenceCollection<K, T, S>.TryGetValue 方法

Gets the value associated with the specified key.

命名空間:  Microsoft.SqlServer.Management.Sdk.Sfc
組件:  Microsoft.SqlServer.Management.Sdk.Sfc (在 Microsoft.SqlServer.Management.Sdk.Sfc.dll 中)

語法

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

參數

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

傳回值

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

實作

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

請參閱

參考

SfcReferenceCollection<K, T, S> 類別

Microsoft.SqlServer.Management.Sdk.Sfc 命名空間