You can access any properties defined in the parent class not defined as
private
.
abstract class AbstractClass
{
private int privateVariable { get; set; }
public int publicVariable { get; set; }
internal int internalVariable { get; set; }
protected int protectedVariable { get; set; }
protected internal int protectedinternalVariable { get; set; }
}
class DerivedClass : AbstractClass
{
public DerivedClass()
{
publicVariable = 1;
internalVariable = 2;
protectedVariable = 3;
protectedinternalVariable = 4;
}
}
There is a lot more involved in abstract and base classes than just access. You can define methods in an abstract class as abstract, and then the derived class must define those methods. Also you can override or create new methods in the derived class. Need to look at general article on abstract classes, this has some of the information:
All about abstract classes.[
^]