Search Results for

    Show / Hide Table of Contents

    Enum MathOperator

    An enum used for addition and subtraction options

    Namespace: LemonEdge.Utils
    Assembly: Utils.dll
    Syntax
    public enum MathOperator : short
    Remarks

    The value of this enum for subtract is -1, meaning the enum can be used like so:

    int x = 7, y = 8;
    var op = MathOperator.Subtract;
    var result = x + (((int)op) * y);
    op = MathOperator.Add;
    var result2 = x + (((int)op) * y);

    Where the results are:

    result = -1, result2 = 15

    Fields

    Name Description
    Add

    Indicates values should be added together

    Subtract

    Indicates items should be subtracted

    Extension Methods

    EnumHelper.GetShortFlaggedValues<MathOperator>()
    EnumHelper.ToShortGuid<MathOperator>()
    MiscExtensions.SetIfNotEqual<MathOperator, P>(Expression<Func<MathOperator, P>>, P)
    ReflectionExtensions.ClearEventInvocations(String)
    ReflectionHelper.GetEnumValueCustomAttributes<AttrType, MathOperator>()
    StringExtensions.ToCSVFormatString(Type)
    SQLExtensions.ToSQLValue(Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.