Returns null if the dictionary is empty.
null
Namespace: CodeJam.CollectionsAssembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static Dictionary<TKey, TValue> NullIfEmpty<TKey, TValue>( this Dictionary<TKey, TValue> dictionary )
VB
<ExtensionAttribute> Public Shared Function NullIfEmpty(Of TKey, TValue) ( dictionary As Dictionary(Of TKey, TValue) ) As Dictionary(Of TKey, TValue)
F#
[<ExtensionAttribute>] static member NullIfEmpty : dictionary : Dictionary<'TKey, 'TValue> -> Dictionary<'TKey, 'TValue>
2(System.Collections.Generic.Dictionary{
Type: Dictionary(TKey, TValue)null if the dictionary is empty.