I have a Variance column created from the data by the program.
How can I round this up in the C#?
dt.Columns.Add("Unit Price", typeof(string));
dt.Columns.Add("Price", typeof(string));
dt.Columns.Add("Variance", typeof(string));
dt.Rows[i]["Variance"] = ((billPrice - dPrice) / billPrice)*100;
Well you never said what sort or rounding but if it’s pounds and pence then
dt.Rows[i][“Variance”] = System.Math.Round(((billPrice – dPrice) / billPrice)*100,2);