Enum.HasFlag
should be same as the type on which it is being invoked CS-W1055The HasFlag
method determines if one or more bit fields are set for the specified enum
. However, the argument that is passed to this method should be of the same type as that of the enum
on which this method is being invoked. Failing to provide proper argument may result in incorrect results.
fooEnum.HasFlag(Bar.Baz);
fooEnum.HasFlag(Foo.Buzz);