How will you make strings with TitleCase ?

 Posted by Bhakti on 12/15/2009 | Category: ASP.NET Interview questions | Views: 3972

With dynamic pages, sometimes you need to create titles dynamically. At such stage you can not go back to check whether they are stored in proper Title case or not. To make this task happen you can use string class provided toUpper() and toLower() methods but that would be much time consuming and tedious job. You can use, titlecase() method to make it single linear task.
Dim strTest As String = "testing title case"

strTest = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strTest.ToLower()) ' will result Testing Title Case

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response