Capitalize the first of each word in C#
In below code you can find the threading used to capitalize the first of each word in a string in C#.using System;
public class Program
{
public static void Main()
{
string s = "HELLO WORLD";
s = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(s.ToLower());
Console.WriteLine(s);
}
}
Output
Hello World