Bitmask.HasOnlyFlags

Method in Bitmask

Declaration

public bool HasOnlyFlags(int flags)

Description

Checks if the bitmask contains only the given flags and no other flags. ((mask ^ flags) & flags) == 0

Parameters

flagsThe flags to check for.

Returns

boolTrue if the bitmask contains only the given flags, false otherwise.