- 
                Notifications
    
You must be signed in to change notification settings  - Fork 35
 
T_CodeJam_Collections_CollectionExtensions
        Andrew Koryavchenko edited this page Jun 17, 2018 
        ·
        7 revisions
      
    Various collections extensions.
System.Object
  CodeJam.Collections.CollectionExtensions
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static class CollectionExtensionsVB
<ExtensionAttribute>
Public NotInheritable Class CollectionExtensionsF#
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type CollectionExtensions =  class end
| Name | Description | |
|---|---|---|
![]()  
 | 
AddRange(T)(ICollection(T), IEnumerable(T)) | Adds the elements to the end of the ICollection(T). | 
![]()  
 | 
AddRange(T)(ICollection(T), IList(T)) | Adds the elements to the end of the ICollection(T). | 
![]()  
 | 
AddRange(T)(ICollection(T), T[]) | Adds the elements to the end of the ICollection(T). | 
![]()  
 | 
DefaultIfEmpty(T)(List(T), T) | Returns a new collection with default value if the collection is empty. | 
![]()  
 | 
DefaultIfEmpty(T)(T[], T) | Returns a new array with default value if the array is empty. | 
![]()  
 | 
DefaultIfEmpty(TKey, TValue)(Dictionary(TKey, TValue), TKey, TValue) | Returns a new dictionary with default value if the dictionary is empty. | 
![]()  
 | 
DefaultIfEmpty(TKey, TValue)(Dictionary(TKey, TValue), TKey, TValue, IEqualityComparer(TKey)) | Returns a new dictionary with default value if the dictionary is empty. | 
![]()  
 | 
EmptyIfNull(T)(IEnumerable(T)) | Returns an empty instance of the collection for null values. | 
![]()  
 | 
EmptyIfNull(T)(List(T)) | Returns an empty instance of the collection for null values. | 
![]()  
 | 
EmptyIfNull(T)(T[]) | Returns an empty instance of the array for null values. | 
![]()  
 | 
EmptyIfNull(TKey, TValue)(Dictionary(TKey, TValue)) | Returns an empty instance of the dictionary for null values. | 
![]()  
 | 
EmptyIfNull(TKey, TValue)(Dictionary(TKey, TValue), IEqualityComparer(TKey)) | Returns an empty instance of the dictionary for null values. | 
![]()  
 | 
IsNullOrEmpty(T)(ICollection(T)) | 
Indicates whether the specified collection is null or empty. | 
![]()  
 | 
IsNullOrEmpty(T)(T[]) | 
Indicates whether the specified array is null or empty. | 
![]()  
 | 
NotNullNorEmpty(T)(ICollection(T)) | Indicates whether the specified collection is not null nor empty. | 
![]()  
 | 
NotNullNorEmpty(T)(T[]) | Indicates whether the specified array is is not null nor empty. | 
![]()  
 | 
NullIfEmpty(T)(List(T)) | 
Returns null if the collection is empty. | 
![]()  
 | 
NullIfEmpty(T)(T[]) | 
Returns null if the collection is array. | 
![]()  
 | 
NullIfEmpty(TKey, TValue)(Dictionary(TKey, TValue)) | 
Returns null if the dictionary is empty. | 
