Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-202.cs
1 public class Generic<T>
2 {
3         private T[,] container = new T[1,1];
4         
5         public T this [int row, int col]
6         {
7                 get {
8                         return container[row, col];
9                 }
10                 set {
11                         container[row, col] = value;
12                 }
13         }
14 }
15
16 public struct Fault
17 {
18         public static void Main ()
19         {
20                 Generic<Fault> gen = new Generic<Fault> ();
21                 gen[0, 0] = new Fault ();
22                 System.Console.WriteLine (gen[0, 0].ToString ());
23         }
24         
25         public override string ToString ()
26         {
27                 return "Hi!";
28         }
29 }