| is an OR and & is AND.
I have the following code and they works OPPOSITE.
int a = 0;
int b = 0;
int c = -1;
if ((a | b | c) == 0)
{
textBox8.Text = "everything 0";
}
else
{
textBox8.Text = "something is not a 0"; // <- code goes here
}
if ((a & b & c) == 0)
{
textBox9.Text = "everything 0"; // <- code goes here
}
else
{
textBox9.Text = "something is not a 0";
}
why i have this result?