S
Sin Jeong-hun
Hello.
This question may be stupid.
enum MyValues
{
Value1, Value2, Value3, Value4, Value5
}
....in the code...
MyValues test=MyValues.Value1 | MyValues.Value2;
....to check if it contains Value1 flag...
if( (test&MyValues.Value1) == MyValues.Value1) <== HERE
{
Do something.
}
I always did that way but is that the cleanest way? Is there more
shorter expression for that?
This question may be stupid.
enum MyValues
{
Value1, Value2, Value3, Value4, Value5
}
....in the code...
MyValues test=MyValues.Value1 | MyValues.Value2;
....to check if it contains Value1 flag...
if( (test&MyValues.Value1) == MyValues.Value1) <== HERE
{
Do something.
}
I always did that way but is that the cleanest way? Is there more
shorter expression for that?