fork download
  1. using System;
  2.  
  3. public class Subclase2
  4. {
  5. // Definiciones restantes sobre la clase Object
  6.  
  7. protected override string ToString() // Esto es correcto.
  8. {
  9. // Implementación de ToString en Subclase
  10. return "";
  11. }
  12.  
  13. public static void Main()
  14. {
  15.  
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 33480KB
stdin
Standard input is empty
compilation info
prog.cs(7,30): error CS0507: `Subclase2.ToString()': cannot change access modifiers when overriding `public' inherited member `object.ToString()'
/usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty