Imports System
Imports System.Globalization
Public Class SamplesCompareInfo
Public Shared Sub Main()
Dim myStr1 As [String] = "B"
Dim myStr2 As [String] = "b"
Dim myComp As CompareInfo = CultureInfo.InvariantCulture.CompareInfo
Console.WriteLine(" With no CompareOptions : {0}", myComp.Compare(myStr1, myStr2))
Console.WriteLine(" With None : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.None))
Console.WriteLine(" With Ordinal : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.Ordinal))
Console.WriteLine(" With StringSort : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.StringSort))
Console.WriteLine(" With IgnoreCase : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.IgnoreCase))
Console.WriteLine(" With IgnoreSymbols : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.IgnoreSymbols))
Console.WriteLine(" With IgnoreCase and IgnoreSymbols : {0}", myComp.Compare(myStr1, myStr2, CompareOptions.IgnoreCase Or CompareOptions.IgnoreSymbols))
End Sub
End Class