How to Format a String in Proper Case or Title Case in VB.NET
This is a basic function used to format a string into it proper case equivalent without the use of the VB6 (visualbasic.dll) namespace.
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: How to Format a String in Proper Case or Title Case in VB.NET

Jim StevensPosted Mar 28, 2011, 9:35 AM EDT
Dim propercase as string = StrConv(SomeText, VbStrConv.ProperCase)
Adam DownsPosted Sep 1, 2010, 12:32 PM EDT
To simplify Public Function ToProper(ByVal str As String) As String Dim newString As New StringBuilder For Each s As String In str.Split(" ") newString.Append(s.Substring(0, 1).ToUpper & s.Substring(1).ToLower + " ") Next Return newString.ToString.Trim End Function
RenatoPosted Aug 16, 2009, 10:58 PM EDT
I wonder why you didn't use the StringBuilder. As you know, in .NET strings are immutable and when you write something like Dim a As String = "hello" a += " world" you created two distinct strings in your heap memory. One containing "hello" and another one containing "hello world" (plus the \0 char, of course). So, you're going to create N+1 distinct strings where N is the number of the characters in the starting one. :)