Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:19:42+00:00 2026-06-15T10:19:42+00:00

I have a parent class with one important abstract procedure which I am overloading

  • 0

I have a parent class with one important abstract procedure which I am overloading in many child classes as the example code shown below:

TCParent = Class
private
public
 procedure SaveConfig; virtual; abstract;

end;

TCChild = Class(TCParent)
private
public
 procedure SaveConfig; override;
end;

Now there I need to (overload) this procedure with another SaveConfig procedure that will accept parameters, yet I don’t want to make big changes in the parent class that might require that I go and make changes in all other child classes.

Is there a way I can overload SaveConfig in this specific child class without making big changes to the parent class and other child classes that inherit from it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:19:42+00:00Added an answer on June 15, 2026 at 10:19 am

    You can use reintroduce to add a new overloaded method. Note that the order of reintroduce; overload; in the child class is required; if you reverse them, the code won’t compile.

    TCParent = Class
    private
    public
     procedure SaveConfig; virtual; abstract;
    end;
    
    TCChild = Class(TCParent)
    private
    public
     procedure SaveConfig; overload; override;
     procedure SaveConfig(const FileName: string); reintroduce; overload;
    end;
    

    (Tested in Delphi 7, so should work in it and all later versions.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one parent class, which is abstract class for now, for four different
I have a MustInherit Parent class with two Child classes which Inherit from the
In a situation where you have a parent class which has one child class,
I have a parent class which contains a child object. I am using set
In Django, when you have a parent class and multiple child classes that inherit
I am creating a one-to-many relationship. so, i have a parent and a child.
I have a Parent.java class and 4 child classes as Child1.java , Child2.java and
I have 3 classes, a Base class, a Parent class and a Child class.
I'm developing an application that will have a parent class which will have many
I have the following two models: class Parent < ActiveRecord::Base has_one :child, dependent: :destroy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.