Hello,
I've got the following enum:
[Flags]
public enum MyStates
{
None = 0
Saved = 1
New = 2
Changed = 4
Deleted = 8
Moved = 16
}
....
Now I create two variables:
MyStates aValue = MyStates.Changed | MyStates.Moved | MyStates.New
MyStates bValue = MyStates.Changed | MyStates.New
Now i want to check if the values in bValue included in aValue (this
must be true)
But if i create a variable, let's call her cValue:
MyStates cValue = MyStates.Changed | MyStates.Saved
In this case cValue is not included in aValue... But my If statement
returns 1 when I compare aValue and cValue:
if ( (IstWert & SollWert) 0)
{
DoSomeThing();
}
Can somebody tell me, how to solve this problem?
Thanks, Chris