title: IndexOf method returns 0 when it should had return -1 in C# / Java
body: <p>A friend of mine came to me with this strange behavior which i can't explain, any insight view would be appreciated.</p>
  
  <p>Im running VS 2005 (C# 2.0), the following code show the behavior</p>
  
  <pre><code>int rr = "test".IndexOf("");
  Console.WriteLine(rr.ToString());
  </code></pre>
  
  <p>the above code, print "0" which clearly show it should have return -1</p>
  
  <p>This also happen in Java where the following Class show the behavior:</p>
  
  <pre><code>public class Test{
   public static void main(String[] args){
     System.out.println("Result-&gt;"+("test".indexOf("")));
   }
  }
  </code></pre>
  
  <p>Im running Java 1.6.0_17</p>