Exemplo n.º 1
0
 /// <summary>
 /// Tests if the IDictionary is empty.
 /// </summary>
 /// <typeparam name="TKey">The type of the key of
 /// the IDictionary.</typeparam>
 /// <typeparam name="TValue">The type of the values
 /// of the IDictionary.</typeparam>
 /// <param name="collection">The collection to test.</param>
 /// <returns>True if the collection is empty.</returns>
 public static bool IsEmpty <TKey, TValue>(this IDictionary <TKey, TValue> collection)
 {
     collection.ExceptionIfNull("The collection cannot be null.", "collection");
     return(collection.Count == 0);
 }