Solved

CLI property using class and interface

Posted on 2006-07-13
1
169 Views
Last Modified: 2010-04-24
example:

interface class  I
{
public:
      property long testP;
      void test (long);

};


ref class ctest: public I
{
public:
            virtual property long testP
            {
                  long get()
                  {
                        return 0L;
                  }
                  void set(long Val)
                  {
                  }
            }            

            virtual void testF(long) = I::test
            {
            }            
};


Interface function I::test => became class function ctest::testF
How can I do the same with that property??
0
Comment
Question by:PLABB
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17097527
interface class  I
{
public:
    property long testP { long get(); void set(long Val); };
    void test (long);

};


ref class ctest: public I
{
public:
    virtual property long testP
    {
        long get() = I::testP::get
        {
            return 0L;
        }
        void set(long Val) = I::testP::set
        {
        }
    }          

    virtual void testF(long) = I::test
    {
    }          
};
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question