Abstract Method Signature Definition
13 views (last 30 days)
I want an abstract class in which an abstract method called "RunModel" is defined. Nevertheless, this " RunModel " does receive different parameters depending on the child class. For Example
- classY_instance.RunModel(param1, param2)
What is the best way to define the abstract method in the abstract class? I have noticed that if I simply define it as:
it actually works, but I have an uneasy feeling about it. Is there a better way to do it?
Anand Swaroop on 7 Dec 2021
your definition of abstract method is absolutly correct. by default access property of a mathod is public. So you can omit it to reduce signature. you can write your mentioned example as following
this might suit well to your expectation.
for more information you can read following documentation