Click here to Skip to main content
16,016,157 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: __property oddity Pin
Tom Archer2-May-02 15:06
Tom Archer2-May-02 15:06 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 14:37
James T. Johnson2-May-02 14:37 
GeneralRe: __property oddity Pin
Neil Van Note2-May-02 20:45
Neil Van Note2-May-02 20:45 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 20:50
James T. Johnson2-May-02 20:50 
GeneralRe: __property oddity Pin
Neil Van Note2-May-02 21:26
Neil Van Note2-May-02 21:26 
GeneralRe: __property oddity Pin
Tom Archer3-May-02 4:14
Tom Archer3-May-02 4:14 
GeneralRe: __property oddity Pin
James T. Johnson3-May-02 4:44
James T. Johnson3-May-02 4:44 
GeneralRe: __property oddity Pin
Rama Krishna Vavilala3-May-02 4:28
Rama Krishna Vavilala3-May-02 4:28 
I don't think it's a bug. To me it is looks quite obvious that the scope resolution should fail in the second case as it tries to resolve the token Graphics in the local scope and it turns out to be a property name where property name is not expected. Solve this using

using namespace System;
using namespace System::Drawing;
public __gc class Foo
{
    public:
        Foo();
        ~Foo();

        __property Graphics* get_Graphics()
        {
            return m_pGraphics;
        }
        __property Bitmap* get_Bitmap()
        {
            return m_pBitmap;
        }
private:
    System::Drawing::Graphics *m_pGraphics;
    System::Drawing::Bitmap   *m_pBitmap;
};


And for all the C# haters, C# compiler is much smarter in this regard.
GeneralRe: __property oddity Pin
James T. Johnson3-May-02 4:48
James T. Johnson3-May-02 4:48 
GeneralRe: __property oddity Pin
Neil Van Note3-May-02 7:41
Neil Van Note3-May-02 7:41 
GeneralGeneral MC++ Info Pin
Brian Delahunty1-May-02 4:17
Brian Delahunty1-May-02 4:17 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:06
sitebuilderAlbert Pascual1-May-02 7:06 
GeneralRe: General MC++ Info Pin
Brian Delahunty1-May-02 7:31
Brian Delahunty1-May-02 7:31 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:34
sitebuilderAlbert Pascual1-May-02 7:34 
GeneralRe: General MC++ Info Pin
Brian Delahunty1-May-02 7:39
Brian Delahunty1-May-02 7:39 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:40
sitebuilderAlbert Pascual1-May-02 7:40 
GeneralRe: General MC++ Info Pin
Brian Delahunty3-May-02 2:21
Brian Delahunty3-May-02 2:21 
GeneralRe: General MC++ Info Pin
Michael P Butler1-May-02 22:51
Michael P Butler1-May-02 22:51 
GeneralRe: General MC++ Info Pin
Brian Delahunty3-May-02 2:22
Brian Delahunty3-May-02 2:22 
GeneralRe: General MC++ Info Pin
Tom Archer1-May-02 14:40
Tom Archer1-May-02 14:40 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 16:11
sitebuilderAlbert Pascual1-May-02 16:11 
GeneralRe: General MC++ Info Pin
Nish Nishant1-May-02 12:30
sitebuilderNish Nishant1-May-02 12:30 
GeneralRe: General MC++ Info Pin
Shog91-May-02 12:45
sitebuilderShog91-May-02 12:45 
GeneralRe: General MC++ Info Pin
Nish Nishant1-May-02 13:04
sitebuilderNish Nishant1-May-02 13:04 
GeneralRe: General MC++ Info Pin
Shog91-May-02 13:16
sitebuilderShog91-May-02 13:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.