Spread Windows Forms 6.0 Product Documentation
Operator Property
See Also  Example Support Options
FarPoint.CalcEngine Assembly > FarPoint.CalcEngine Namespace > BinaryOperatorExpression Class : Operator Property


Glossary Item Box

Gets the operator for the expression.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Operator As BinaryOperatorInfo
Visual Basic (Usage)Copy Code
Dim instance As BinaryOperatorExpression
Dim value As BinaryOperatorInfo
 
value = instance.Operator
C# 
public BinaryOperatorInfo Operator {get;}

Property Value

BinaryOperatorInfo object containing the operator

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 Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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