Updating a windows form label with employee pay information. I need to format the output to display currency for money values.
I have tried following the instructions in my textbook for formatting using {0:C}.
// Output to label.
lblEmployees.Text += "Name: " + empList[x].name + " Gross Pay: {0:C}" +
empList[x].grossP + " Social Security Withheld: " + empList[x].socialW
+ " Medicare Withheld: " + empList[x].medicareW + " State
Income Tax Withheld: " + empList[x].stateW + " Federal Income Tax Withheld:
" + empList[x].federalW + " Net Pay: " + empList[x].netP + "\n";
No errors attempted format I showing up as part of the string.