Solved

CLI property using class and interface

Posted on 2006-07-13
1
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VC++ 6.0 issue 3 78
How do I open an Access Data base with a password set using C++ 2 135
Pointers - Drive letter 1 71
How to 4 54
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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