Version

ToDouble() Method

Convert this class instance's value to a double data type
Syntax
'Declaration
 
Public Overloads Function ToDouble() As Double
public double ToDouble()
Example
Following code shows you how to calculate a formula on fly.

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( ) );
			}
		}
Requirements

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

See Also