Допустим, есть два класса. Студент и аспирант. Как правильно сделать конструктор в классе-наследнике "Аспирант", чтобы инициализировались поля, которые есть в родительском классе и поля, которые есть в самом "аспиранте?"
class Student
{
protected string name;
protected string faculty;
protected string year;
int rating;
public Student(string name, string faculty, string year, int rating)
{
this.name = name;
this.faculty = faculty;
this.year = year;
this.rating = rating;
}
}
class Aspirant : Student
{
string teacher;
string code;
public Aspirant(string teacher, int code)
{
}
}
:base