There is a base class and heir. Both have the same constructor parameters.
I was told that if the parameters are the same, then the constructor in the heir can be ignored or something like that .
However, while rummaging through Google, I did not find an example of inheritance with the same parameters, and in all examples the parameters of the base class and the heir were different.
In short, how should this code be written correctly?
class CustomCommand { public CustomCommand(string t, string a) { trigger = new Regex(t); triggerStr = t; ansver = a; } public virtual void Fire(string n, string m, string c) { } public Regex trigger; public string triggerStr; public string ansver; }; class EasyCommand : CustomCommand { public EasyCommand(string t, string a) : base(t, a) { } public override void Fire(string n, string m, string c) { m = "123"; } };