Skip to content

Helpers Class

General code helpers.

C#
public static class Helpers

Inheritance object

Checks for the presense of a flag in a value.

C#
public static bool HasFlag(in int value, in int flag)

value int
The value.

flag int
The flag.

bool
true when the flag exists in the value; otherwise false.

Sets a flag in a value.

C#
public static int SetFlag(int value, int flag)

value int
The value.

flag int
The flag.

int
A new value with the flag added.

Removes a flag from a value.

C#
public static int UnsetFlag(int value, int flag)

value int
The value.

flag int
The flag.

int
A new value with the flag removed.