fork download
  1. using static System.Console;
  2.  
  3. public static class Program {
  4. public static void Main(string[] args) => new Derivada(1, "");
  5. }
  6.  
  7. public class Inicial {
  8. public Inicial() => WriteLine("Inicial"); //chamarĂ¡ base(), especificamente Object()
  9. }
  10.  
  11. public class Base : Inicial {
  12. public Base(int x) : base() => WriteLine("Base");
  13. }
  14.  
  15. public class Derivada : Base {
  16. public Derivada(int x, string y) : base(x) => WriteLine("Derivada");
  17. }
  18.  
  19. //https://pt.stackoverflow.com/q/579238/101
Success #stdin #stdout 0.05s 24468KB
stdin
Standard input is empty
stdout
Inicial
Base
Derivada