Hi All
I have a question on Inheritance
I have an abstract class Shape with two properties int X and int Y
I have a concrete class Triangle which inherits Shape
Triangle class has an additional property Y
abstract class Shape
{
public int x,
public int y
}
class triangle : Shape
{
public int y;
}
When i say Shape S = new Triangle();
I expect to see the properties X,Y and Z......But i only see X and Y....
I am confused
Please explain..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group. To post to this group, send email to C_Sharp googlegroups.com To unsubscribe from this group, send email to C_Sharp-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/C_Sharp -~----------~----~----~----~------~----~------~--~---
|