dotnet / dotnet/dotnet-api-docs

Some GroupBy exception documentation is incomplete

Open
#6,945 2 comments 0 reactions 0 assignees View on GitHub
area-System.Linq Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The documentation [here](https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.groupby?view=netcore-3.0) does not always specify when an ```ArgumentNullException``` will be thrown.

- ```public static System.Collections.Generic.IEnumerable GroupBy (this System.Collections.Generic.IEnumerable source, Func keySelector, Func elementSelector, Func,TResult> resultSelector)```
should indicate that ```ArgumentNullException``` will be thrown if ```source``` or ```keySelector``` or ```elementSelector``` or ```resultSelector``` is ```null```
- ```public static System.Collections.Generic.IEnumerable GroupBy (this System.Collections.Generic.IEnumerable source, Func keySelector, Func elementSelector, Func,TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer)``` should indicate that ```ArgumentNullException``` will be thrown if ```source``` or ```keySelector``` or ```elementSelector``` or ```resultSelector``` is ```null```
- ```public static System.Collections.Generic.IEnumerable GroupBy (this System.Collections.Generic.IEnumerable source, Func keySelector, Func,TResult> resultSelector)``` should indicate that ```ArgumentNullException``` will be thrown if ```source``` or ```keySelector``` or ```resultSelector``` is ```null```
- ```public static System.Collections.Generic.IEnumerable GroupBy (this System.Collections.Generic.IEnumerable source, Func keySelector, Func,TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer)``` should indicate that ```ArgumentNullException``` will be thrown if ```source``` or ```keySelector``` or ```resultSelector``` is ```null```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.