N
Noah Stein
I'm getting a C2327 on something along the lines of this:
public ref class A
{
public:
virtual property String ^ DisplayName { String ^ get() override; }
[System::ComponentModel:isplayName("Type")]
property Object ^ Type { Object ^ get(); }
};
I can't see why C2327 should apply. I'm guessing it falls into the category
explained by example b. I'm wondering why this shouldn't be allowed. Where
is the ambiguity?
This has some fairly big repurcussions if this is intentional. Does this
mean that I now have to avoid using any name as a property that might appear
as an attribute? How can I possibly know what attributes MS plans to add in
the future? What about 3rd party attributes? If I use a 3rd party library
that uses attributes, am I then supposed to go through my entire codebase
changing property names to eradicate the conflict?
Thanks,
Noah
public ref class A
{
public:
virtual property String ^ DisplayName { String ^ get() override; }
[System::ComponentModel:isplayName("Type")]
property Object ^ Type { Object ^ get(); }
};
I can't see why C2327 should apply. I'm guessing it falls into the category
explained by example b. I'm wondering why this shouldn't be allowed. Where
is the ambiguity?
This has some fairly big repurcussions if this is intentional. Does this
mean that I now have to avoid using any name as a property that might appear
as an attribute? How can I possibly know what attributes MS plans to add in
the future? What about 3rd party attributes? If I use a 3rd party library
that uses attributes, am I then supposed to go through my entire codebase
changing property names to eradicate the conflict?
Thanks,
Noah