Class shortAndboolExtensions
Extension methods that handle the equivalences between short and bool in NetServer
Inheritance
shortAndboolExtensions
Assembly: SoCore.dll
Syntax
public static class shortAndboolExtensions
Methods
ToBool(short)
Convert a short value to a bool (0 = false, everything else = true)
Declaration
public static bool ToBool(this short val)
Parameters
| Type |
Name |
Description |
| short |
val |
|
Returns
| Type |
Description |
| bool |
true if val is not 0. 0 is false
|
ToBool(ushort)
Convert a short value to a bool (0 = false, everything else = true)
Declaration
public static bool ToBool(this ushort val)
Parameters
| Type |
Name |
Description |
| ushort |
val |
|
Returns
ToShort(bool)
Convert a bool to a short (true -> 1, false -> 0)
Declaration
public static short ToShort(this bool val)
Parameters
| Type |
Name |
Description |
| bool |
val |
|
Returns