Re: How to Type cast ArrayList items to class objects

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




ok got the point, i will reuse the vb class in c# and from the c#
library i will return the class object and in vb i will type cast the
returned arraylist item to vb class.

Thank you to all.




Chris Dunaway wrote:
budy_ludy wrote:
Chris Dunaway,

which means i cannot cast a c# class to vb class even though they share
same structure,

Exactly. Just use the C# class and add the function that you need to
that or if you need it in VB or cannot alter the C# class, then in your
VB class, just inherit from the C# class then you can add your function
in VB plus you will be able to cast from the C# class to the VB class.

.



Relevant Pages

  • [PATCH] ps3disk: Remove superfluous cast
    ... As ps3disk is a ppc64-only driver, sector_t equals to unsigned long, and the ... Reuse in another driver is protected by the safety net called ... `compiler warning' (with the cast, it may silently truncate to 32-bit). ... we will get a compiler warning as well (with the ...
    (Linux-Kernel)
  • Re: [Cbe-oss-dev] [PATCH] ps3disk: Remove a superfluous cast
    ... As ps3disk is a ppc64-only driver, sector_t equals to unsigned long, and the ... Reuse in another driver is protected by the safety net called ... `compiler warning' (with the cast, it may silently truncate to 32-bit). ... we will get a compiler warning as well (with the ...
    (Linux-Kernel)
  • Re: Java Typecasting Internals
    ... to allow the cast to proceed. ... efficiently implement instanceof. ... You could prepare a list of all those left superclass class object ...
    (comp.lang.java.programmer)
  • Re: newbie question sabout class design
    ... important is not to inherit from the list class - but rather create a ... overriding the original methods. ... I'm probably doing it wrong because I still have to cast. ... (with no parameter specification) indicates calling the ...
    (comp.lang.pascal.delphi.misc)
  • Re: Activator Question
    ... instance of any classes that inherit from the generic type T. ... concrete class of T. ... can't make this cast. ...
    (microsoft.public.dotnet.framework)