[sdks] Fix README.md
[mono-project.git] / mcs / tests / gtest-063.cs
blob70486e88bb8e2b79498f878091197d7eaeeb5918
1 using System;
3 public class Test
5 public static int IndexOf (Array array, object value)
7 // This is picking the non-generic version.
8 return IndexOf (array, value, 0, array.Length);
11 public static int IndexOf (Array array, object value, int startIndex, int count)
13 return 2;
16 public static int IndexOf<T> (T[] array, T value, int startIndex, int count)
18 return 1;
22 class X
24 public static int Main ()
26 Test test = new Test ();
27 string[] array = new string [] { "Hello" };
29 int result = Test.IndexOf (array, array);
30 if (result != 2)
31 return 1;
33 string hello = "Hello World";
34 // This is picking the generic version.
35 result = Test.IndexOf (array, hello, 1, 2);
36 if (result != 1)
37 return 2;
39 return 0;