For example I have this code
var person = new HighrisePerson()
{
FirstName = firstName,
ContactData = new HighriseContactData()
{
EmailAddresses = new List<HighriseEmailAddress>
{
new HighriseEmailAddress
{
Address = email,
Location = "Work"
}
}
}
};
I'd like to refactor to this:
var person = new HighrisePerson(firstName, email)
and I'd like this constructor added to my HighrisePerson Class
public HighrisePerson(string firstName, string email)
{
FirstName = firstName,
ContactData = new HighriseContactData()
{
EmailAddresses = new List<HighriseEmailAddress>
{
new HighriseEmailAddress
{
Address = email,
Location = "Work"
}
}
}
};