using System.Data; namespace Sample { static class Program { static void Main() { DataColumn dc = new DataColumn("dc", typeof(double)); DataTable dt = new DataTable(); dt.Columns.Add(dc); DataRow dr = dt.NewRow(); dt.Rows.Add(dr); //dc.Expression = "100 * 10000 * 10000"; // --> System.OverflowException: Value was either too large or too small for an Int32. dc.Expression = "100.0 * 10000.0 * 10000.0"; //--> works, but doesn't help me } } }
double d = 100d * 10000d * 10000d;
double d = 100 * 10000 * 10000;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)