Friday, July 10, 2015

Simple title case function for ASP.NET in VB. DotNet .NET title case. Capitalise first letter .NET

So first time today i realised there is no inbuilt function in .net to convert a string to title case (capitalise the first letter).  Seems crazy that you have to make your own.  anyway heres a really simple function in VB.NET

   Function toTitleCase(ByVal strIn As String) As String

        Return (UCase(Left(strIn, 1)) & Right(strIn, strIn.Length - 1))

   End Function


  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Online Training from India. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.