Proper Title Case - CSharp System

CSharp examples for System:String Case

Description

Proper Title Case

Demo Code


using System.Threading;
using System.Text.RegularExpressions;
using System.Text;
using System.Security.Cryptography;
using System.Net;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;//from  w w  w . j a va 2  s.c om

public class Main{
        public static string ProperCase(string stringInput) 
        {
            //Get the culture property of the thread.
            CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
            //Create TextInfo object.
            TextInfo textInfo = cultureInfo.TextInfo;
            //Convert to title case.
            return textInfo.ToTitleCase(stringInput);
        }
}

Related Tutorials