Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: CC00091 Method GetEnumerator should never be made static #696

Copy link
Copy link
@giggio

Description

@giggio
Issue body actions

If a method is named GetEnumerator and returns an IEnumerator it should not be made static. If it was changed you could break existing foreachs. See reference on MSDN;

Example:

class MyList
{
    public System.Collections.IEnumerator GetEnumerator()
    {
        yield return "x";
        yield return "y";
    }
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.