LitDev.LDLogic.Switch C# (CSharp) Method

Switch() public static method

A sorthand conditional statement.
public static Switch ( Primitive condition, Primitive value1, Primitive value2 ) : Primitive
condition Primitive A condition or variable that evaluates to "True" or "False".
value1 Primitive The value to return if condition is "True".
value2 Primitive The value to return if condition is "False".
return Primitive
        public static Primitive Switch(Primitive condition, Primitive value1, Primitive value2)
        {
            return condition ? value1 : value2;
        }