Convert Text to Sentence - C#

To convert any given sentence into Title Case, use the following code.

public static string PropCase(string strText)
{
return new
CultureInfo("en").TextInfo.ToTitleCase(strText.ToLower());
}

Ofcourse, you have to use the Globalization class to get the CultureInfo method be available for conversion.
-----------------------
If you have something to share in person on this post, pl drop me a mail at dskcheck@gmail.com with the title in the subject.

Comments

Popular posts from this blog

Network Intrusion Detection using Supervised ML technique

Common mistakes by Interviewer

Keep the system active, to avoid the auto lock