dotnet / dotnet/dotnet-api-docs
System.Linq.Enumerable.Repeat method: Explanation for count argument slightly inaccurate (nitpicking)
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
I admit, this issue report is on the verge of nitpicking, but nevertheless...
The `count` argument for the `Enumerable.Repeat` method currently states:
> _The number of times to repeat the value in the generated sequence_
This is of course incorrect :)
In fact, the value is repeated `count-1` times in the generated sequence; when `count` is being 0 the generated sequence is empty.
A more accurate description for the `count` argument could perhaps be something like:
> _The number of times the value occurs in the generated sequence_
----
Github link to the respective line in the documentation source: https://github.com/dotnet/dotnet-api-docs/blob/739ea290c4423665b5f06ca6938b75c8b5b6e11b/xml/System.Linq/Enumerable.xml#L8566
Link to documentation: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.repeat?view=netstandard-2.1
Contributor guide
Assessment
This issue has not been assessed yet.