a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
30 lines
440 B
C#
30 lines
440 B
C#
public class Generic<T>
|
|
{
|
|
private T[,] container = new T[1,1];
|
|
|
|
public T this [int row, int col]
|
|
{
|
|
get {
|
|
return container[row, col];
|
|
}
|
|
set {
|
|
container[row, col] = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public struct Fault
|
|
{
|
|
public static void Main ()
|
|
{
|
|
Generic<Fault> gen = new Generic<Fault> ();
|
|
gen[0, 0] = new Fault ();
|
|
System.Console.WriteLine (gen[0, 0].ToString ());
|
|
}
|
|
|
|
public override string ToString ()
|
|
{
|
|
return "Hi!";
|
|
}
|
|
}
|