An instance of this class may contain one of several base data types including doubles, singles, integers, booleans, strings, and error values.
The class implements the IConvertible interface providing methods to perform conversions between the basic data types.
Additionally the class provides methods to perform basic arithmetic operations and comparisons between UltraCalcValue objects.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Imports Infragistics.Win.CalcEngine Imports Infragistics.Win.UltraWinCalcManager Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click Dim formula As String = "average( 10, 15, 20 )" Dim result As UltraCalcValue = Me.UltraCalcManager1.Calculate(formula) If result.IsError Then MessageBox.Show(Me, result.ToString()) Else Dim doubleVal As Double = result.ToDouble() MessageBox.Show(Me, doubleVal.ToString()) End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; using Infragistics.Win.CalcEngine; using Infragistics.Win.UltraWinCalcManager; private void button1_Click(object sender, System.EventArgs e) { string formula = "average( 10, 15, 20 )"; UltraCalcValue result = this.ultraCalcManager1.Calculate( formula ); if ( result.IsError ) { MessageBox.Show( this, result.ToString( ) ); } else { double doubleVal = result.ToDouble( ); MessageBox.Show( this, doubleVal.ToString( ) ); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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