when you new a object
it will call the class constructor
if the class is subclass of baseclass
it will firstly call the baseclass constructor
problem:
the baseclass has no 0 arguments constructor
when
subclass s=new subclass()(subclass extend baseclass)
will expose an error
you must special arguments to the baseclass when you write subclass
class subclass
{
public subclass():base(arguments){}
}
浙公网安备 33010602011771号