I am getting too many decimal spaces, I only want to see 2 decimal spaces, example (0.67) and (0.04)
This is code.
Thank you
//Linear FT Stack =Q2/12
Decimal Q = Convert.ToInt32(rows.Cells[16].Value ?? 0);
var C = 12;
Decimal W = Q / C;
rows.Cells[22].Value = W;//Raw Linear Ft Day =(V2*W2)/U2
int V21 = Convert.ToInt32(rows.Cells[21].Value ?? 0);
var W22 = Convert.ToDecimal(rows.Cells[22].Value ?? 0);
int U20 = Convert.ToInt32(rows.Cells[20].Value ?? 0);
var X = V21 == 0 ? 0 : V21 * W22 / U20;
rows.Cells[23].Value = X;
This is my result with above code.
Booney440