Search Results for

    Show / Hide Table of Contents

    Enum MathOperator

    An enum used for addition and subtraction options

    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.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>(MathOperator)
    EnumHelper.ToShortGuid<MathOperator>(MathOperator)
    LinqExtensions.AsArray<MathOperator>(MathOperator)
    LinqExtensions.ToArrayOfOne<MathOperator>(MathOperator)
    LinqExtensions.ToListOfOne<MathOperator>(MathOperator)
    MiscExtensions.SetIfNotEqual<MathOperator, TP>(MathOperator, Expression<Func<MathOperator, TP>>, TP)
    ReflectionExtensions.GetEnumValueCustomAttributes<AttrType, MathOperator>(MathOperator)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.