class Abstract{}class item:Abstract
{
public gettype(){return 0;}
}class collection:Abstract
{
public gettype(){return 1;}
}main()
{
 arrylist a = new arrylist();
 Abstract b = new item();
 Abstract c = new collection();
 a.Add(b);
 a.Add(c);
 
 a[0].gettype();
 a[1].gettype();
}
如上代码,我怎么确定a[0].gettype()和a[1].gettype()的区别? 也就是我怎么分辨出来a[0]和a[1]为不同类型呢?
请求高人指点,谢谢