[Mono-list] String.Compare - MS doc discrepancies
Martin Baulig
martin@gnome.org
28 Feb 2002 15:05:39 +0100
Hi,
according to the MS docs, the following code should throw an exception
(the sum of indexA and length is greater than strA.Length):
====
string needle = "ab";
string haystack = "abababab";
int result;
result = String.Compare (needle, 0, haystack, 0, 5);
====
Our implementation "correctly" throws the exception - but the microsoft
runtime does not.
So, what's the correct behavior ?
--
Martin Baulig
martin@gnome.org