public static void AddAddress(this Patient patient, string family, string given, string country, string state, string city, params string[] lines) { HumanName name = new HumanName { Family = new List <string> { family }, Given = new List <string> { given } }; Address address = new Address { Country = country, State = state, City = city, Line = (lines == null) ? null : lines.ToList() }; patient.AddContact(name, address); }