Skip to content

Instantly share code, notes, and snippets.

@jnm2
Last active October 2, 2023 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnm2/88b4bbe821d1152e687f51f8f4cf134e to your computer and use it in GitHub Desktop.
Save jnm2/88b4bbe821d1152e687f51f8f4cf134e to your computer and use it in GitHub Desktop.
.NET collection interfaces
flowchart
    ICollection --- IEnumerable
    IList --- ICollection
    IEnumerableT[IEnumerable<T>] --- IEnumerable
    ICollectionT[ICollection<T>] --- IEnumerableT
    IListT[IList<T>] --- ICollectionT
    IReadOnlyCollectionT[IReadOnlyCollection<T>] --- IEnumerableT
    IReadOnlyListT[IReadOnlyList<T>] --- IReadOnlyCollectionT
flowchart
    ICollection --- IEnumerable
    IDictionary --- ICollection
    IEnumerableT[IEnumerable<KeyValuePair<TKey, TValue>>] --- IEnumerable
    ICollectionT[ICollection<KeyValuePair<TKey, TValue>>] --- IEnumerableT
    IDictionaryT[IDictionary<TKey, TValue&gt] --- ICollectionT
    IReadOnlyCollectionT[IReadOnlyCollection<KeyValuePair<TKey, TValue>>] --- IEnumerableT
    IReadOnlyDictionaryT[IReadOnlyDictionary<TKey, TValue>] --- IReadOnlyCollectionT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment