Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be raised when iterating inside a 'ForEach' 'Action' ('foreach') style #426

Open
okipol88 opened this issue Oct 12, 2022 · 0 comments

Comments

@okipol88
Copy link

The IterationWarningDoesNotWork should raise a warning:

class IteratingUsingActionExample
{
  public void SingleItemClassicStyle()
  {
    var stream = new MemoryStream();
  }

  public void IterationWarningDoesNotWork()
  {
    Enumerable.Range(0, 2)
      .ToList()
      .ForEach(_ => new MemoryStream());
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant