If you're intention is to derive Foo from ArrayList, you should instead
derive from CollectionBase. The problem is, an array list can store anything
derived from System.Object. In c#, you can use the 'new' keyword to overload
a method, but if your derived class is casted to an IList or an ArrayList,
nothing is to stop the user from calling IList[X] = Foo, or ArrayList[Y] =
Y.
> U?ytkownik "Hasani (remove nospam from address)"
> <hblackwell@n0sp4m.popstick.com> napisa? w wiadomo?ci
[quoted text clipped - 52 lines]
> }
> };
thwei - 15 Jul 2004 09:17 GMT
Thanks. Its must derived over CollectionBase and work ok. Thanks again.
U?ytkownik "Hasani (remove nospam from address)"
<hblackwell@n0sp4m.popstick.com> napisa? w wiadomo?ci
news:OnESF%23daEHA.3112@tk2msftngp13.phx.gbl...
> If you're intention is to derive Foo from ArrayList, you should instead
> derive from CollectionBase. The problem is, an array list can store anything
> derived from System.Object. In c#, you can use the 'new' keyword to overload
> a method, but if your derived class is casted to an IList or an ArrayList,
> nothing is to stop the user from calling IList[X] = Foo, or ArrayList[Y] =
> Y.