Imports System
Imports System.Globalization
Public Class SamplesCompareInfo
Public Shared Sub Main()
Dim myStr1 As [String] = "Bill's"
Dim myStr2 As [String] = "bills"
' Creates a CompareInfo that uses the InvariantCulture.
Dim myComp As CompareInfo = CultureInfo.InvariantCulture.CompareInfo
' Compares two strings using myComp.
Console.WriteLine("Comparing ""{0}"" and ""{1}""", myStr1, myStr2)
Console.WriteLine("With Ordinal: {0}", myComp.Compare(myStr1, myStr2, CompareOptions.Ordinal))
End Sub
End Class
|