Using .net
To add a $ symbol for numbers I did Texbox1.Text.Format = "C"
How to add % symbol at the end of each integer to represent a string in textbox.
Using .net
To add a $ symbol for numbers I did Texbox1.Text.Format = "C"
How to add % symbol at the end of each integer to represent a string in textbox.
Standard Numeric Format Strings; in particular: the Percent ("P") Format Specifier.
double number = 1.2;
lbl.Text = number.ToString("P");
Produces: 120.00%
double number = 0.12;
lbl.Text = number.ToString("P");
Produces: 12.00%
So if you have a percentage already:
double number = 12;
lbl.Text = (number / 100).ToString("P");
Produces: 12.00%