Skip to content

System.Linq.Enumerable.Repeat method: Explanation for count argument slightly inaccurate (nitpicking) #4012

Open
@elgonzo

Description

@elgonzo

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:

<param name="count">The number of times to repeat the value in the generated sequence.</param>

Link to documentation: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.repeat?view=netstandard-2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.LinquntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions