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

Combination Equal problem #183

Open
wojiuxuihuan opened this issue Aug 8, 2023 · 0 comments
Open

Combination Equal problem #183

wojiuxuihuan opened this issue Aug 8, 2023 · 0 comments

Comments

@wojiuxuihuan
Copy link

wojiuxuihuan commented Aug 8, 2023

The origon code as following, which will always get the wrong answer:

        protected bool Equals(Combination other)
        {
            return TriggerKey == other.TriggerKey && Chord.Equals(other.Chord);
        }

Add a pair of parentheses should fix:

        protected bool Equals(Combination other)
        {
            return (TriggerKey == other.TriggerKey) && Chord.Equals(other.Chord);
        }
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