Capitalize the First Letter of a Word in C#
I noticed that a few of my labels in the right column were in lower-case. Since I
wrote my own label control, I decided to add a line of code to make sure the first letter in each tag was capitalized.
string labelName;
labelName = char.ToUpper(labelName[0]) + labelName.Substring(1);
Labels: Csharp, Strings
posted by MAS on Jun 14, 2007
Legacy Comments