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

 

Updated: November 29, 2016

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)

public bool TryGetValue(
	TKey key,
	out TValue value
)

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.

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright

Show: