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){}

 

}

posted on 2011-11-30 17:27  残月枯花  阅读(170)  评论(0)    收藏  举报