public ExpressionOperation(ExpressionOperationKind kind) { if (kind == ExpressionOperationKind.Number) throw new InvalidOperationException( "Number has to be specified only for ExpressionOperationKind.Number or Identifier"); Kind = kind; Number = 0; }
public ExpressionOperation(ExpressionOperationKind kind, int number) { if (kind != ExpressionOperationKind.Number) throw new InvalidOperationException( "Number can be specified only for ExpressionOperationKind.Number"); Kind = kind; Number = number; }