Hi,
İf you wonder as to how to capitalize simply first letter of each words in a string, you can use ToTitleCase.
Check the sample below,
using System;
using System.Globalization;
namespace ToTitleCaseApp
{
class Program
{
static void Main(string[] args)
{
string capitalizedFirstLetter = CultureInfo.CurrentCulture.TextInfo.ToTitleCase("shoot for the moon. even if you miss, you'll land among the stars.");
Console.WriteLine(capitalizedFirstLetter);
Console.ReadKey();
}
}
}
Result :
Shoot For The Moon. Even If You Miss, You'll Land Among The Stars.
I think, it is a handy method.
have a good time!
Tags: cultureinfo, totitlecase