Making the First letter of every word
using System;
using System.Globalization;
namespace Dharmaraj.CapitalizingLetters
{
internal class Program
{
static void Main(string[] args)
{
string textToTransform = "Dharmaraj,You need to submit more code snippets!";
Console.WriteLine("Original text: " + textToTransform);
//capitalizing the first letter of our text using the current culture
Console.WriteLine("Capitalize using the current culture: "
+ CultureInfo.CurrentCulture.TextInfo.ToTitleCase(textToTransform));
//capitalizing the first letter of our text using a defined culture
CultureInfo newCultureInfo = new CultureInfo("zh-Hans", false);
TextInfo textInfo = newCultureInfo.TextInfo;
Console.WriteLine("Capitalize using a specified culture: " + textInfo.ToTitleCase(textToTransform));
Console.Read();
}
}
}