fork(1) download
  1. using System;
  2.  
  3. class A
  4. {
  5. public A(){Console.WriteLine("I am in A);}
  6. }
  7. class B : A
  8. {
  9. static B(){Console.WriteLine("I am in Static B);}
  10.  
  11. public B(){Console.WriteLine("I am in B);}
  12. }
  13. class C : B
  14. {
  15. static C(){Console.WriteLine("I am in Static C);}
  16.  
  17. public C(){Console.WriteLine("I am in C);}
  18. }
  19.  
  20. public class Test
  21. {
  22. static void Main()
  23. {
  24. // your code goes here
  25. C obj = new C();
  26. }
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,43): error CS1010: Newline in constant
prog.cs(6,0): error CS1525: Unexpected symbol `}', expecting `)' or `,'
prog.cs(6,1): error CS1002: ; expected
prog.cs(9,50): error CS1010: Newline in constant
prog.cs(11,1): error CS1525: Unexpected symbol `public'
prog.cs(11,11): error CS1525: Unexpected symbol `{'
prog.cs(11,43): error CS1010: Newline in constant
prog.cs(12,0): error CS1525: Unexpected symbol `}', expecting `)' or `,'
prog.cs(12,1): error CS1002: ; expected
prog.cs(13,0): error CS1525: Unexpected symbol `class', expecting `)' or `,'
prog.cs(14,0): error CS1525: Unexpected symbol `{'
prog.cs(15,1): error CS1525: Unexpected symbol `static'
prog.cs(15,11): error CS1525: Unexpected symbol `{'
prog.cs(15,50): error CS1010: Newline in constant
prog.cs(17,1): error CS1525: Unexpected symbol `public'
prog.cs(17,11): error CS1525: Unexpected symbol `{'
prog.cs(17,43): error CS1010: Newline in constant
prog.cs(18,0): error CS1525: Unexpected symbol `}', expecting `)' or `,'
prog.cs(18,1): error CS1002: ; expected
prog.cs(20,0): error CS1525: Unexpected symbol `public', expecting `)' or `,'
prog.cs(21,0): error CS1525: Unexpected symbol `{', expecting `)' or `,'
prog.cs(22,1): error CS1525: Unexpected symbol `static', expecting `)' or `,'
prog.cs(22,9): error CS1547: Keyword `void' cannot be used in this context
prog.cs(22,17): error CS1525: Unexpected symbol `(', expecting `)' or `,'
prog.cs(26,246): error CS1525: Unexpected symbol `end-of-file'
Compilation failed: 25 error(s), 0 warnings
stdout
Standard output is empty