override和reintroduce有什么区别,能举出例子吗?

解决方案 »

  1.   

    override是继承的时候用
    Contrstor create; 
    begin
      inherted Create;
    end
      

  2.   

    可以说Reintroduce是override和overload的集合
      

  3.   

    override当前方法参数和父方法的参数相同;
    reintroduce可以不同The reintroduce directive suppresses compiler warnings about hiding previously declared virtual methods. For example,procedure DoSomething; reintroduce;  // the ancestor class also has a DoSomething methodUse reintroduce when you want to hide an inherited virtual method with a new one.