So I haven been learning Java for a while but decided to switch to C#. It's been a while so I may forget some things. What I know is that in Java, when inheriting from a super class you can or can not call the super class and pass in the parameter if it accepts it. For example:
public class Super
{
public Super(int x)
{
}
}
public class Sub extends Super
{
public Sub()
{
super(5);
}
}
and then this other example:
public class Super
{
public Super(int x)
{
}
}
public class Sub extends Super
{
public Sub()
{
}
}
is also totally fine since it does not have to pass in parameter to the superclass, correct me if I am wrong. But then in C#, I am not sure if you are required to pass in the parameter for the superclass or not(like if it is still legal and won't cause any problem)