I've come across this code snippet (that works) and I'm curious as to what the syntax is.
if (keyData == (Keys.Control | Keys.F)) {
MessageBox.Show("What the Ctrl+F?");
}
I've searched for
| Operator C#
but this merely results in links to the ||
OR operator.
My inital thoughts are that this could be shorthand for if (keydata == keys.Control || keydata == Keys.F)
(syntax I would love to see in C#7) but this doesn't seem to be the case.
Could anyone please explain this to me?