I have a base class that takes one argument in the constructor Then I create a child class and I also use a constructor with on argument.
The idea is that the constructor of DeviceA overrides the constructor of GenericDevice
However the system complains
Error CS7036 There is no argument given that corresponds to the required formal parameter 'address' of 'GenericDevice.GenericDevice(string)'
I'm not sure why this error happens, since DeviceA doesn't need the constructor of GenericDevice, it has its own
class GenericDevice {
GenericDevice(string address){
}
void Connect() {
}
}
class DeviceA : GenericDevice
{
DeviceA(string address) {
}
void Foo() {
}
}