Hi,
I have the following example
Here what does the operator "|" stand for.
The answer is 6, but what does the "|" operator actually do.
I have the following example
Code:
enum MaterialColors
{
Blue=1,Red=2,Yellow=4, Purple=Blue|Red,Green=Yellow|Blue,Orange=Red|Yellow,
}
class Program
{
static void Main(string[] args)
{
int j = (int)MaterialColors.Orange;
Console.WriteLine(j.ToString());
Console.Read();
}
}
The answer is 6, but what does the "|" operator actually do.
Comment