In addition to the other comments, you might be able to PadLeft the shorter
string with max length of the two strings...
Something like:
Public Class SpecialComparer
Implements IComparer(Of String)
Public Function Compare(ByVal x As String, ByVal y As String) As
Integer Implements IComparer(Of String).Compare
Dim totalWidth As Integer = Math.Max(x.Length, y.Length)
Return String.Compare(x.PadLeft(totalWidth),
y.PadLeft(totalWidth))
End Function
End Class
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Kb" <fo*********@yahoo.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
Hello There,
How do i compare string such that A < B<... <Y<Z<BA<BB... <CA... <ZZ
Thanks
KB