' Sample for String.ToUpper(CultureInfo)
Imports System
Imports System.Globalization
Imports Microsoft.VisualBasic
Class Sample
Public Shared Sub Main()
Dim str1 As [String] = "idea"
Dim str2, str3 As [String]
Console.WriteLine("str2 = Upper case copy of str1 using English-United States culture.")
str2 = str1.ToUpper(New CultureInfo("en-US", False))
Console.WriteLine("str3 = Upper case copy of str1 using Turkish-Turkey culture.")
str3 = str1.ToUpper(New CultureInfo("tr-TR", False))
Console.WriteLine("str2 is {0} to str3.", IIf(0 = [String].CompareOrdinal(str2, str3), "equal", "not equal"))
DeCode(str1)
DeCode(str2)
DeCode(str3)
End Sub
Public Shared Sub DeCode( s As [String])
Dim c As Char
For Each c In s
Console.Write("{0:x4} ", AscW(c))
Next c
Console.WriteLine()
End Sub
End Class