Calling a second level base class constructor
问题 In C#, I have a class, foo , that inherits from class bar , which in turn inherits from class foobar . In the foo constructor, I want to call the foobar constructor directly, not from a call to the bar constructor. I tried something like this: public foo(int i): base : base(i) Obviously this does not work. How would you make it work, without passing through the bar constructor? 回答1: You can't, as you cannot skip the initialization of bar. You have to create a constructor in bar that passes