D
DDK
What is the best way to capitalize the first letter of a string?
Thanks for any help,
d.
Thanks for any help,
d.
DDK said:What is the best way to capitalize the first letter of a string?
Thanks for any help,
d.
DDK said:What is the best way to capitalize the first letter of a string?
Thanks for any help,
d.
DDK said:Thanks for the examples.
I just modified an example I found, I use a label control, as follows:
string strInput = "lowercase";
// if the first char is lower case
if (char.IsLower(strInput[0]))
// capitalize it
strInput = char.ToUpper(strInput[0]) + strInput.Substring(1,
strInput.Length-1);
DDK said:What is the best way to capitalize the first letter of a string?