Spread for ASP.NET 7.0 Product Documentation
BinaryOperatorExpression Constructor
See Also  Example Support Options
FarPoint.CalcEngine Assembly > FarPoint.CalcEngine Namespace > BinaryOperatorExpression Class : BinaryOperatorExpression Constructor


oper
Operator
arg0
Left-side operand
arg1
Right-side operand

Glossary Item Box

Creates a new expression with a binary operator applied to a pair of operands.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal oper As BinaryOperatorInfo, _
   ByVal arg0 As Expression, _
   ByVal arg1 As Expression _
)
Visual Basic (Usage)Copy Code
Dim oper As BinaryOperatorInfo
Dim arg0 As Expression
Dim arg1 As Expression
 
Dim instance As New BinaryOperatorExpression(oper, arg0, arg1)
C# 
public BinaryOperatorExpression( 
   BinaryOperatorInfo oper,
   Expression arg0,
   Expression arg1
)

Parameters

oper
Operator
arg0
Left-side operand
arg1
Right-side operand

Exceptions

ExceptionDescription
System.ArgumentNullExceptionoper or arg0 or arg1 is a null reference (Nothing in Visual Basic)

Example

This example creates a new expression with a binary operator applied to a pair of operands.
C#Copy Code
FarPoint.CalcEngine.Expression arg1 = new FarPoint.CalcEngine.DoubleExpression(1.0);
FarPoint.CalcEngine.Expression arg2 = new FarPoint.CalcEngine.DoubleExpression(2.0);
FarPoint.CalcEngine.Expression oneplustwo = new FarPoint.CalcEngine.BinaryOperatorExpression(FarPoint.CalcEngine.BinaryOperatorInfo.AddOperator,arg1, arg2);
//Spread for Windows Forms
((FarPoint.Win.Spread.Model.IExpressionSupport)fpSpread1.ActiveSheet.Models.Data).SetExpression(0, 0, oneplustwo);
//Spread for Web Forms
((FarPoint.Web.Spread.Model.IExpressionSupport)FpSpread1.Sheets[0].DataModel).SetExpression(0, 0, oneplustwo);
Visual BasicCopy Code
Dim arg1 As FarPoint.CalcEngine.Expression
Dim arg2 As FarPoint.CalcEngine.Expression
Dim oneplustwo As FarPoint.CalcEngine.Expression
arg1 = New FarPoint.CalcEngine.DoubleExpression(1.0)
arg2 = New FarPoint.CalcEngine.DoubleExpression(2.0)
oneplustwo = New FarPoint.CalcEngine.BinaryOperatorExpression(FarPoint.CalcEngine.BinaryOperatorInfo.AddOperator, arg1, arg2)
'Spread for Windows Forms
CType(FpSpread1.ActiveSheet.Models.Data, FarPoint.Win.Spread.Model.IExpressionSupport).SetExpression(0, 0, oneplustwo)
'Spread for Web Forms
CType(FpSpread1.Sheets(0).DataModel, FarPoint.Web.Spread.Model.IExpressionSupport).SetExpression(0, 0, oneplustwo)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.