Show / Hide Table of Contents

Class Helpers

General code helpers.

Inheritance
object
Helpers
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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

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

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.

In this article

Back to top

Back to top Generated by DocFX