Possible Duplicate:
Does not contain a constructor that takes 0 arguments
I have a DAL class called getData with a constructor that forces you to pass the connection string:
namespace AQProduct
{
public class getData
{
public getData(string strConnectionString)
{
}
}
}
I have classes that do the actual work:
namespace AQProduct
{
public class User_DL : getData
{
}
}
Build fails with
‘AQProduct.getData’ does not contain a constructor that takes 0
arguments
How do I get this to work?
In a (non-static) class, if you don’t add a constructor of your own, one is implicitly created of the form:
i.e. call the base-class’s parameterless constructor. Since that doesn’t exist, you will need to add a custom constructor, for example:
or: