ExtensionMethod.NET Home of 875 C#, Visual Basic, F# and Javascript extension methods

ChangeCase

Change the text to TitleCase using the en-US culture

Source

<System.Runtime.CompilerServices.Extension()> _
Public Class MyExtension

    <System.Runtime.CompilerServices.Extension()> _
    Shared Function ChangeCase(ByVal source As String) As String
        Return New System.Globalization.CultureInfo("en-US").TextInfo.ToTitleCase(source)
    End Function

End Class

Example

todo

Author: unkown

Submitted on: 21 aug 2007

Language: VB

Type: System.String

Views: 4521