I
Ingvar Nilsen
I have a base component, from which several components derive.
What I want is to just publish some of the protected properties in the
base component.
public class BaseClass
{
private int FA;
protected int A
{
get {return FA;}
set {FA = value;}
}
}
public class DerivedClass: BaseClass
{
Here I just want to publish the protected property A
}
Can this be done with just a directive?
Or do I need:
new public int A
{
get {return base.A;}
set {base.A = value;}
}
To do this?
I come from another environment, Borland Delphi, where this can be done
in a very simple way, I find the above approach rather cumbersome when
publishing many properties.
What I want is to just publish some of the protected properties in the
base component.
public class BaseClass
{
private int FA;
protected int A
{
get {return FA;}
set {FA = value;}
}
}
public class DerivedClass: BaseClass
{
Here I just want to publish the protected property A
}
Can this be done with just a directive?
Or do I need:
new public int A
{
get {return base.A;}
set {base.A = value;}
}
To do this?
I come from another environment, Borland Delphi, where this can be done
in a very simple way, I find the above approach rather cumbersome when
publishing many properties.