using System;
namespace Articulos.Ch03
{
public class ClaseBase
{
public int X;
public ClaseBase ( int x)
{
this.X = x;
}
}
public class Subclase : ClaseBase
{
// Implementación clase
public static void Main( )
{
// Produce error CS1729 (Articulos.Ch03.ClaseBase'
// does not contain a constructor that takes 0 arguments):
// ClaseBase cb = new ClaseBase(123);
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxvcy5DaDAzCnsKICAgIHB1YmxpYyBjbGFzcyBDbGFzZUJhc2UKICAgIHsKICAgICAgICBwdWJsaWMgaW50IFg7CiAgICAgICAgcHVibGljIENsYXNlQmFzZSAoaW50IHgpCiAgICAgICAgewogICAgICAgICAgICB0aGlzLlggPSB4OwogICAgICAgIH0KICAgIH0KICAgIAogICAgcHVibGljIGNsYXNzIFN1YmNsYXNlIDogQ2xhc2VCYXNlCiAgICB7CiAgICAgICAgLy8gSW1wbGVtZW50YWNpw7NuIGNsYXNlCiAgICAgICAgCiAgICAgICAgcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQogICAgICAgIHsKICAgICAgICAgICAgLy8gUHJvZHVjZSBlcnJvciBDUzE3MjkgKEFydGljdWxvcy5DaDAzLkNsYXNlQmFzZScgCiAgICAgICAgICAgIC8vIGRvZXMgbm90IGNvbnRhaW4gYSBjb25zdHJ1Y3RvciB0aGF0IHRha2VzIDAgYXJndW1lbnRzKToKICAgICAgICAgICAgLy8gQ2xhc2VCYXNlIGNiID0gbmV3IENsYXNlQmFzZSgxMjMpOwogICAgICAgIH0KICAgIH0KfQ==
compilation info
prog.cs(14,18): error CS1729: The type `Articulos.Ch03.ClaseBase' does not contain a constructor that takes `0' arguments
prog.cs(8,16): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout