Create Constructor Problem [250]
I have a base class with similar to:
public class BusinessObject
{
public BusinessObject() { //Stuff here }
public BusinessObject(Guid id) { //More stuff here }
}
In a descendant class, when I use Alt+Ins and create a new parameterless constructor, R# creates the new parameterless constructor, but does not call the base parameterless ctor. As below:
public class TestBo: BusinessObject
{
public TestBo() { }
}
I would expect the following:
public class TestBo: BusinessObject
{
public TestBo(): base() { }
}
Is this a R# issue, or is my design flawed here?
Thanks
Sean
Please sign in to leave a comment.
D'oh....I was not initialising my unit test properly! And I also missed the fact that the dotnet framework automatically calls the base default ctor for me......double d'oh! ;)