I can not figure out why I get this error.
As the code is quite a lot and I don’t get what might be wrong I post a link to all the files.
If someone might figure out why I get this error ” ‘Customer’ does not contain a constructor that takes 5 arguments ” … an hour I am stuck on this… this are the files
The error is in page 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);
}
Customer->
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;
}
Constructor for Customer class is –
And from Book.aspx.cs you are creating instance like –
Replace it with –