Show / Hide Table of Contents

Class shortAndboolExtensions

Extension methods that handle the equivalences between short and bool in NetServer

Inheritance
object
shortAndboolExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
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
Type Description
bool

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
Type Description
short
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top