Tuesday, 11 October 2022

What is Reintroduce ?

 A derived class uses the reintroduce directive to hide the name of a virtual or dynamic method was declared in a base class.

Example:-

 type

  TBooks = class

    public

      procedure Add(Item: Integer); virtual;

  end;

  TMathBook = class

    public

      // The TMathBook.Add method hides TBooks.Add, so that compiler warn you about this.

      procedure Add(Item: Single);reintroduce;

  end;