anyone knows how to add two float numbers with currency sign and place the sum into a dataGridview cell?
this is my code:
private void button8_Click(object sender, EventArgs e)
{
double a =0.70;
double b = 0.50;
dataGridView2.Rows[0].Cells[1].Value = "£" + (a+b);
}
if I declare a and b as float it gives error. if I declare a and b as Double, the result is £1.2 as shown in photo but NOT £1.20 . I made column 1 properties to contain a currency value ( result = £1.2) I made column 1 properties to contain a numeric value and the result is same.
how can I make it £1.20? is there any way to do it?
thank you