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