-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Collections_CollectionExtensions_NullIfEmpty__2
Andrew Koryavchenko edited this page Jun 17, 2018
·
1 revision
Returns null
if the dictionary is empty.
Namespace: CodeJam.Collections
Assembly: 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>
- dictionary
- Type: System.Collections.Generic.Dictionary(TKey, TValue)
[Missing documentation for "M:CodeJam.Collections.CollectionExtensions.NullIfEmpty2(System.Collections.Generic.Dictionary{
0,``1})"]
- TKey
- The type of the key.
- TValue
- The type of the value.
Type: Dictionary(TKey, TValue)null
if the dictionary is empty.
In Visual Basic and C#, you can call this method as an instance method on any object of type Dictionary(TKey, TValue). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
CollectionExtensions Class
NullIfEmpty Overload
CodeJam.Collections Namespace