B
Bratislav Jevtic
hi,
Let's suppose I've got 2 classes: MyClass and MyClassColl (coll is inherited
from ArrayList, for instance). But, when I invoke GetXXX or something
returning object, I receive an object - not instance of MyClass. I've tried
with implicit conversions - not working.
Is there any way to inherit some collection that will have instances of
custom class and make implicit conversion for return values? Practically, I
need typed collection. Because there's no such thing in C#, I'm trying to
find workaround. Can implicit conversions help me? This thing would save lot
of effort.
thanks in advance,
bj
Let's suppose I've got 2 classes: MyClass and MyClassColl (coll is inherited
from ArrayList, for instance). But, when I invoke GetXXX or something
returning object, I receive an object - not instance of MyClass. I've tried
with implicit conversions - not working.
Is there any way to inherit some collection that will have instances of
custom class and make implicit conversion for return values? Practically, I
need typed collection. Because there's no such thing in C#, I'm trying to
find workaround. Can implicit conversions help me? This thing would save lot
of effort.
thanks in advance,
bj