Class Helpers
General code helpers.
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public static class Helpers
Methods
HasFlag(in int, in int)
Checks for the presense of a flag in a value.
Declaration
public static bool HasFlag(in int value, in int flag)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value. |
| int | flag | The flag. |
Returns
| Type | Description |
|---|---|
| bool |
SetFlag(int, int)
Sets a flag in a value.
Declaration
public static int SetFlag(int value, int flag)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value. |
| int | flag | The flag. |
Returns
| Type | Description |
|---|---|
| int | A new value with the flag added. |
UnsetFlag(int, int)
Removes a flag from a value.
Declaration
public static int UnsetFlag(int value, int flag)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value. |
| int | flag | The flag. |
Returns
| Type | Description |
|---|---|
| int | A new value with the flag removed. |