I am using visual basic 2010 express and i need to compare two strings to check if they are the same. The string is "V6EPB-B-S-3-B-CSA". If i put a watch on the variables that hold the string i can see they are the same, but my if clause:
If String.Compare(currentCol(0), modelNumber, StringComparison.OrdinalIgnoreCase) > 0 Then
Still returns a -1 value.
I already tried changing the last argument to StringComparison.CurrentCulture and StringComparison.InvariantCulture and still does not work as per this: http://msdn.microsoft.com/en-us/library/e6883c06.aspx
I am assuming the comparison does not result a positive value because of the hyphen in the middle of the string. How can i make this work?
Thanks
If String.Compare(currentCol(0), modelNumber, StringComparison.OrdinalIgnoreCase) > 0 Then
Still returns a -1 value.
I already tried changing the last argument to StringComparison.CurrentCulture and StringComparison.InvariantCulture and still does not work as per this: http://msdn.microsoft.com/en-us/library/e6883c06.aspx
I am assuming the comparison does not result a positive value because of the hyphen in the middle of the string. How can i make this work?
Thanks