using System;
using System.Collections;
public class Test
{
class Hoge {
public int x = 10;
}
public static void Main()
{
ArrayList testlist = new ArrayList();
Hoge hogeinst = new Hoge();
testlist.Add(hogeinst);
Hoge thisClass = (Hoge)testlist[0];
int y = thisClass.x;
Console.WriteLine(y);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CgljbGFzcyBIb2dlIHsKCQlwdWJsaWMgaW50IHggPSAxMDsKCX0KCQoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCUFycmF5TGlzdCB0ZXN0bGlzdCA9IG5ldyBBcnJheUxpc3QoKTsKCQlIb2dlIGhvZ2VpbnN0ID0gbmV3IEhvZ2UoKTsKCQl0ZXN0bGlzdC5BZGQoaG9nZWluc3QpOwoJCQoJCUhvZ2UgdGhpc0NsYXNzID0gKEhvZ2UpdGVzdGxpc3RbMF07CgkJaW50IHkgPSB0aGlzQ2xhc3MueDsKCQlDb25zb2xlLldyaXRlTGluZSh5KTsKCX0KfQ==