I\'m guessing there\'s something really basic about C# inheritance that I don\'t understand. Would someone please enlighten me?
I assume you mean:
class Foo
{
public Foo(int someVar) {}
}
class Bar : Foo
{
// Why does Bar not automatically have compiler generated version of
Bar(int someVar): Foo(someVar) {}
}
I believe this is inherited from C++ (and Java).
But assuming you did have this and Bar had some other member variables. Would this not introduce the posability of the compiler generated constructor accdently being used and not initialising the members of BAr.