Overwrite a property of ArrayList - Error

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

From: Sebastian Dau (sebastian.dau_at_gmx.de)
Date: 04/27/04

  • Next message: nils: "Re: cannot include <fstream>"
    Date: Tue, 27 Apr 2004 09:33:46 +0200
    
    

    Hi there,

    a couple of days ago I tried to write a class that inherits from ArrayList
    and overwrites some members in order to get a type save array for my
    application.

    public gc class MyData : public Object
    {
    }

    public gc class MyArrayList : public ArrayList
    {
        ... //do some declaration
        public:
            __property MyData __gc* get_Item ( int p_Index ) { // return .. ; }
    }

    in the line that declares the property I get the following compiler error:

    error C2392: //... // : covariant returns types are not supported in managed
    types!

    Does anybody have an idea how to solve this problem. I red this was a bug in
    VS2002 ( VC 7.0 )
    but I'm using VS 2003 (VC 7.1) where it should have been fixed.

    Thank you very much,

    Sebastian Dau.


  • Next message: nils: "Re: cannot include <fstream>"

    Relevant Pages

    • Re: visibility matter on converting object to array
      ... i'll get an array having keys that from member variable's name ... i guessed "i can get public members but not protected, private, static ... Is it right way to access object members?(by converting to ...
      (comp.lang.php)
    • Re: Properties
      ... Instead of properties I would prefer a full abstraction of record, array, ... members and privately implement it as another record with other members or ... private array of Character; ...
      (comp.lang.ada)
    • Re: Array Design
      ... ITOH it's pretty sure you are referencing an element in the array that you ... > When the application starts I initialise a state class, ... > I ask the user how many members to create. ... >>> have exceptions cropping up. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: extract items from list in single field
      ... Try using the Splitfunction to change the delimited string into an array. ... You would then loop through the members of the array and write one record to ...
      (microsoft.public.access.modulesdaovba)
    • Re: how to make a variable based on array length and member value
      ... I have an array full_arrayof an arbitrary number of transaction ... From the array I have created a new array years.uniq! ... what id like to do is take the new arrays members and use them as ... will fail, because you HAVE NOT YET WRITTEN THE CODE. ...
      (comp.lang.ruby)