|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
String.IndexOf(string, int, int) bug? help!Hi all.
this is in .net 2.0, c# //code string d = "dddd????"; int i = d.IndexOf('?', 0, 3); // return -1, why??? // end Thanks Your code only searches for a '?' within the substring (0, 3) and there is
no '?'. The answer is correctly -1 :) http://msdn2.microsoft.com/de-de/library/ms131434.aspx Markus Show quote "Qun" <tshwa***@gmail.com> schrieb im Newsbeitrag news:1150903156.500285.117110@y41g2000cwy.googlegroups.com... > Hi all. > this is in .net 2.0, c# > > //code > string d = "dddd????"; > int i = d.IndexOf('?', 0, 3); // return -1, why??? > // end > > Thanks > |
|||||||||||||||||||||||