M
Marcio Kleemann
I need to force the first letter of each word in a line of text to
uppercase. The text comes from a TextBox control in a Web Form. I'm new to
..NET and am having a problem.
Since I can't modify the string directly, I convert the string to a char[]
using .ToCharArray() and set the first letter of each word to uppercase. The
problem then is I can't figure out how to convert the char array back to a
string. Whether I use .ToString() from the char[] variable, or
Convert.ToString(), or CharConverter.ConvertToStriong(), I get the same
result - they return a string for the type, i.e."System.Char[]".
How can I convert the contents of the char array back to a string type? Or,
is there a better way for me to force capitalization of the first letter of
each word in a string?
Thanks
uppercase. The text comes from a TextBox control in a Web Form. I'm new to
..NET and am having a problem.
Since I can't modify the string directly, I convert the string to a char[]
using .ToCharArray() and set the first letter of each word to uppercase. The
problem then is I can't figure out how to convert the char array back to a
string. Whether I use .ToString() from the char[] variable, or
Convert.ToString(), or CharConverter.ConvertToStriong(), I get the same
result - they return a string for the type, i.e."System.Char[]".
How can I convert the contents of the char array back to a string type? Or,
is there a better way for me to force capitalization of the first letter of
each word in a string?
Thanks