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

redundant 'continue' in a foreach loop #32

Closed
itaibh opened this issue Feb 22, 2011 · 2 comments
Closed

redundant 'continue' in a foreach loop #32

itaibh opened this issue Feb 22, 2011 · 2 comments

Comments

@itaibh
Copy link

itaibh commented Feb 22, 2011

this:

        foreach (string s in list)
        {
            s.ToLower();
        }

decompiled to this on debug build:

foreach (string current in list)
{
    current.ToLower();
    continue;
}

and to this on release build:

using (List.Enumerator<string> enumerator = list.GetEnumerator())
{
    while (enumerator.MoveNext())
    {
        enumerator.Current.ToLower();
        continue;
    }
}
@richardschneider
Copy link

fixed in richardschneider@c15fdc2

@dsrbecky
Copy link
Member

Rewritten goto removal.
Closed by 1bc3066
Closed by 1bc3066

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants