Can i force a non-default constructor?
Hey all,
I wanted to know if I can force the "Choose fields to initialize" to show up? Coding practices where I work have us defaulting values to fields (ie: private int _id = 0; as opposed to just private int _id;). However when i do that and hit alt+insert it only gives me the default constructor. I still want to be able to choose the fields that will be sent into the constructor as they are needed for object init() code. This worked in the old re-sharper, but no longer does.
Is there some key combination that will still pop up the dialog for me (or some setting I am missing)?
Here is the class I tested with if you need to reproduce (alt+INS produced the code in red bleow):
namespace ClassLibrary1
{
public class Class1
{
private int _id = 5;
public int Id
{
get { return _id; }
set { _id = value; }
}
public Class1()
{
}
}
}
Thanks.
-J
Please sign in to leave a comment.