В данный класс добавьте конструктор с параметрами для инициализации всех полей класса
class Abonent
{
public int id{get; set;}
public stringSurname{get; set;}
}
Мой вариант:
class inform
{
static void Main(string[] lines)
{
Abonent Human = new Abonent();
Human.id = 13;
Human.Surname = "Ivanov";
Human.Abonent();
Console.ReadKey();
}
}
class Abonent : inform
{
public int id { get; set; }
public string Surname { get; set; }
public void Abonent(int id, string Surname)
{
this.id = id;
this.Surname = Surname;
}
}
Источник: Stack Overflow на русском