Skip to content

ToggleFlag Method ​

Definition ​

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

int ToggleFlag(int value, int flag) ​

csharp
int ToggleFlag(int value, int flag)

Toggle a flag (switch the bitmask state)

Parameters ​

NameDescription
flagThe zero-based position of the flag to toggle
valueThe current bitmask value

Returns ​

The updated bitmask value with the flag toggled