private property

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Is possible to make visible on property page a private property inherited
from a usercontrol ?

Ex

public class A : UserControl
{
private:
__property set_Visible( bool visibled)
{
....
}
__property bool get_Visible();
{
....
}
}


public class B : A
{
public:
__property set_Visible( bool visibled)
{
....
}
__property bool get_Visible();
{
....
}
}


The property Visible on class B is not visible on ide property page.

Thanks in advance
 
Simon said:
Is possible to make visible on property page a private property
inherited from a usercontrol ?

Unfortunately, I don't know enough about the property page in the IDE to
answer your question directly, but I can say that at face value it doesn't
seem possible. Private members (including properties) are not accessible to
derived classes. What is the problem you are trying to solve?

Cheerio!
 
chazmo said:
Have you tried using "friend"... I.e., place "friend
class B" inside class A...

Unfortunately, friend classes are not supported for __gc or __value classes.
This is because the CLR does not have any way to represent type friendship,
and since the CLR enforces the accessibility of members a program that tries
to access a private member of another class will not run.

Hope that makes sense. Cheerio!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top