linux-packaging-mono/mono/tests/generic-array-iface-set.2.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

20 lines
333 B
C#

using System;
using System.Collections.Generic;
class A {
static int Main ()
{
A [] aa = new A [1];
IList<object> io = aa;
try {
io [0] = new object ();
A a = aa [0];
Console.WriteLine ("{0}", a.GetType ());
} catch (ArrayTypeMismatchException) {
return 0;
}
return 1;
}
}