Table of Contents

Class Minus

Namespace
Albatross.Expression.Infix
Assembly
Albatross.Expression.dll

Infix expression that performs arithmetic subtraction between two numeric operands. Uses the "-" operator with precedence 100.

public class Minus : InfixExpression, IInfixExpression, IExpression, IToken, IHasPrecedence
Inheritance
Minus
Implements
Inherited Members
Extension Methods

Constructors

Minus()

Initializes a new instance of the Minus class with operator "-" and precedence 100.

public Minus()

Methods

Run(object, object)

Performs subtraction by converting both operands to double and subtracting the right from the left.

protected override object Run(object left, object right)

Parameters

left object

The left operand (minuend) to convert to double.

right object

The right operand (subtrahend) to convert to double.

Returns

object

The result of left minus right as a double.

Exceptions

FormatException

Thrown when either operand cannot be converted to double.