how to make first word always capital in c# code example
Example: c# capitalize first letter
string text = "john smith";
// "John smith"
string firstLetterOfString = text.Substring(0, 1).ToUpper() + text.Substring(1);
// "John Smith"
// Requires Linq! using System.Linq;
string firstLetterOfEachWord =
string.Join(" ", text.Split(' ').ToList()
.ConvertAll(word =>
word.Substring(0, 1).ToUpper() + word.Substring(1)
)
);