Skip to content

ToggleFlag Method ​

Definition ​

  • Namespace: JASE.Extensions
  • Assembly: JASE.Primitives.dll

long ToggleFlag(long value, int flag, int maxFlag = null) ​

csharp
long ToggleFlag(long value, int flag, int maxFlag = null)

Toggle a flag (switch the bitmask state)

Parameters ​

NameDescription
flagThe zero-based position of the flag to toggle
maxFlagThe maximum flag value to use (Default: 63)
valueThe current bitmask value

Returns ​

The updated bitmask value with the flag toggled