Solved

CLI property using class and interface

Posted on 2006-07-13
1
167 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now