Skip to content

BoolExtensions

Namespace: SideXP.Core

public static class BoolExtensions

Extension functions for boolean values.

Fields

TrueLabel

public const string TrueLabel = "true"

FalseLabel

public const string FalseLabel = "false"

Methods

ToLabel(bool, string, string)

public static string ToLabel(bool value, string labelIfTrue = "true", string labelIfFalse = "false")

Converts this boolean into a label.

Parameters

  • value: The boolean value to convert.
  • labelIfTrue: The output label if the boolean is true.
  • labelIfFalse: The output label if the boolean is false.

Returns

Returns the appropriate label.