なぜこのエラーが発生するのかわかりません。コードが非常に多く、何が間違っているのかがわからないので、すべてのファイルへのリンクを投稿します。誰かがこのエラー「 'Customer' does not contain a constructor that takes 5 arguments」を受け取った理由を理解するかもしれません...これで立ち往生している1時間...これはファイルです エラーはページbook.aspxにあります
if (Page.IsPostBack)
{
Customer c1 = new Customer(txtFirstname.Text, txtLastname.Text, txtAddress.Text, txtZip.Text, txtCity.Text);
Pet p1 = new Pet(txtSpecies.Text, txtName.Text,c1);
service.pets.Add(p1);
}
お客様->
public Customer(int customerId, string firstname, string lastname, string address, string zipcode, string city, string email, string phone)
: base(firstname, lastname)
{
this.firstname = firstname;
this.lastname = lastname;
}