Like in all other object programming languages. If you have class A that have some public or protected attributes and you create class B that inherit from A then B by B you can access all public attributes of B and A as well and in B you can access protected attributes from A.
Simple sample (because topic is much more complicated i would suggest reading some documentation or tutorials about object programing):
class Vechicle
{
public String Engine; //all our vechicles have some kind of engine
}
class Bike inherit Vechicle
{
public bool IsCross;
}
Next you can use:
Bike honda = new Bike();
honda.IsCross=true;
honda.Engine = "750";
Hope it will help to start...



LinkBack URL
About LinkBacks





Bookmarks