private void btnAdd_Click(object sender, EventArgs e) { //---create three variables for our data Single firstNumber = 0; Single secondNumber = 0; Single totalDue = 0; //---assign the values firstNumber = Convert.ToSingle(txt1.Text); secondNumber = Convert.ToSingle(txt2.Text); totalDue = firstNumber + secondNumber; //'add them Label1.Text = DoFormat(totalDue); //let DoFormat function format as currency } private String DoFormat( Single x) { /* Private means it only works in this form & we pass in a single precision number called X & my function returns a string */ String myResult = ""; //---make 2 decimal places and show $ Use "n2" for number without $ and two decimals myResult = x.ToString("c2"); return myResult; //now send back the formatted string to the btnAdd_Click event so it can be shown in the label. }