fork download
  1. using System;
  2.  
  3. abstract class AbstractBase
  4. {
  5. public abstract void Foo();
  6. }
  7.  
  8. class Base : AbstractBase
  9. {
  10. public sealed override void Foo()
  11. {
  12. }
  13. }
  14.  
  15. class Derived : Base
  16. {
  17. public override void Foo()
  18. {
  19. }
  20. }
  21.  
  22. public class Test
  23. {
  24. public static void Main()
  25. {
  26. }
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(17,30): error CS0239: `Derived.Foo()': cannot override inherited member `Base.Foo()' because it is sealed
prog.cs(10,37): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty