Namespace: Albatross.Expression.Infix
Infix expression that performs not-equal comparison between two operands. Uses the “<>” operator with precedence 50.
public class NotEqual : ComparisonInfixOperation, Albatross.Expression.Nodes.IInfixExpression, Albatross.Expression.Nodes.IExpression, Albatross.Expression.Nodes.IToken, Albatross.Expression.Nodes.IHasPrecedence
Inheritance Object → InfixExpression → ComparisonInfixOperation → NotEqual
Implements IInfixExpression, IExpression, IToken, IHasPrecedence
The operator symbol for this infix operation.
public string Operator { get; }
The token representation, which is the same as the Operator.
public string Token { get; }
The precedence level of this operation for proper evaluation order.
public int Precedence { get; }
The left operand of the infix operation.
public IExpression Left { get; set; }
The right operand of the infix operation.
public IExpression Right { get; set; }
Gets the required left operand, throwing an exception if it’s null.
public IExpression RequiredLeft { get; }
Gets the required right operand, throwing an exception if it’s null.
public IExpression RequiredRight { get; }
Initializes a new instance of the NotEqual class with operator “<>” and precedence 50.
public NotEqual()
Interprets the comparison result to determine if the operands are not equal.
public bool Interpret(int comparisonResult)
comparisonResult
Int32
The result from comparing the operands (-1, 0, or 1).
Boolean
true if the operands are not equal (comparison result is not 0); otherwise, false.