[xbuild] Vbc task - make error column check a little non-specific.
[mono.git] / mcs / tests / gtest-499.cs
1 using System;
2 using System.Reflection;
3
4 public class C
5 {
6         public static int Test<T> (T[] t)
7         {
8                 // Has to include readonly. prefix
9                 return t[0].GetHashCode ();
10         }
11
12         public static int TestExtra<T> (T[,] t)
13         {
14                 // Has to include readonly. prefix
15                 return t[0, 0].GetHashCode ();
16         }
17
18         public static int Main ()
19         {
20                 Test (new[] { 2.1, 4.5 });
21                 Test (new[] { "b" });
22
23                 var body = typeof (C).GetMethod ("Test").GetMethodBody ();
24
25                 // Check for readonly. (0xFE1E)
26                 var array = body.GetILAsByteArray ();
27                 if (array[2] != 0xFE)
28                         return 1;
29
30                 if (array[3] != 0x1E)
31                         return 1;
32
33                 return 0;
34         }
35 }