I have a partial class with a no parameter constructor in a first file. For this partial class, I would like to have another constructor with a parameter in second file.
Unfortunately I get this error :
Class doesn't contain parameterless constructor
I can't add it in the second file, because it already exists in first file.
What's wrong ? Thanks.
First file :
namespace NS
{
public partial class A
{
public A() {...}
}
}
Second file :
namespace NS
{
public partial class A
{
public A(int MyParam) {...}
}
}
I hope this is what you are after. Sorry if I misunderstood. I am new to this.