你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Extensions.GetOrNull<TKey,TValue> Method

Definition

public static TValue GetOrNull<TKey,TValue> (this System.Collections.Generic.IDictionary<TKey,TValue> dictionary, TKey key) where TValue : class;
static member GetOrNull : System.Collections.Generic.IDictionary<'Key, 'Value (requires 'Value : null)> * 'Key -> 'Value (requires 'Value : null)
<Extension()>
Public Function GetOrNull(Of TKey, TValue) (dictionary As IDictionary(Of TKey, TValue), key As TKey) As TValue

Type Parameters

TKey
TValue

Parameters

dictionary
IDictionary<TKey,TValue>
key
TKey

Returns

TValue

Applies to