Changes the casing of a string based on the English (United States) culture, with the culture name en-US. : CultureInfo « I18N Internationlization « VB.Net Tutorial






Imports System
Imports System.Globalization

Public Class SamplesTextInfo

   Public Shared Sub Main()
      Dim myString As String = "this IS a test"

      ' Creates a TextInfo based on the "en-US" culture.
      Dim myTI As TextInfo = New CultureInfo("en-US", False).TextInfo

      ' Changes a string to lowercase.
      Console.WriteLine("""{0}"" to lowercase: {1}", myString, myTI.ToLower(myString))

      ' Changes a string to uppercase.
      Console.WriteLine("""{0}"" to uppercase: {1}", myString, myTI.ToUpper(myString))

      ' Changes a string to titlecase.
      Console.WriteLine("""{0}"" to titlecase: {1}", myString, myTI.ToTitleCase(myString))

   End Sub

End Class








18.1.CultureInfo
18.1.1.CultureInfo(de-DE)
18.1.2.Use all available culture type to format Date and currency
18.1.3.Creates a CompareInfo that uses the InvariantCulture.
18.1.4.Current week of the year is based on CultureInfo
18.1.5.Compare two substrings using different cultures and ignoring the case of the substrings
18.1.6.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern
18.1.7.Specify a CultureInfo set to one of the cultures defined by that object
18.1.8.String representation of an object changes when it is formatted with three different IFormatProvider objects.
18.1.9.Changes the casing of a string based on the English (United States) culture, with the culture name en-US.