I get an error stating "Products does not contain a constructor that takes 0 arguments" from the following code:
public class Products
{
string
Just add
public Products()
{
}
in your products class And you will not get error
Reason: There exists a default constructor with 0 parameter for every class. So no need to define/write it explicitly (by programmer) BUT when you overload a default constructor with your desired number and type of parameters then it becomes a compulsion to define the default constructor yourself (explicitly) along with your overloaded constructor