Convert a string into Title Case or ProperCase


This article help us on Convert a string into Title Case or ProperCase

String class in .NET Framework supports only uppercase and lowercase conversions. To convert a string into Title Case (ProperCase) string, you may have to use the following code.



string s = "welcome to title case";
Console.WriteLine(Microsoft.VisualBasic.Strings.StrConv(s, VbStrConv.ProperCase,0));



The output of the above code is as follows:

Welcome To Title Case


Comments

Author: Sukumar Krish29 Sep 2008 Member Level: Bronze   Points : 1

Thanks. The suggestion worked out for me. In C# there is the method ToTitleCase available but in Vb.Net only upper or lower case conversion is possible.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: