Поделиться через


DataCollection<TKey, TValue>.TryGetValue Method (TKey, TValue)

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Gets the value associated with the specified key.

Namespace:   Microsoft.Xrm.Sdk
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

public bool TryGetValue(
    TKey key,
    out TValue value
)
Public Function TryGetValue (
    key As TKey,
    <OutAttribute> ByRef value As TValue
) As Boolean

Parameters

  • key
    Type: TKey

    Type: TKey. The key of the value to get.

  • value
    Type: TValue

    Type: TValue%. When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Return Value

Type: System.Boolean

Type: Boolean
true if the DataCollection<TKey, TValue> contains an element with the specified key; otherwise, false.

See Also

DataCollection<TKey, TValue> Class
Microsoft.Xrm.Sdk Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright