public Address(Address address)
 {
     if (address == null)
     {
         return;
     }
     City = address.City;
     Country = address.Country;
     Line1 = address.Line1;
     Line2 = address.Line2;
     Line3 = address.Line3;
     PostalCode = address.PostalCode;
     State = address.State;
     Type = address.Type;
 }
        public Contact(Contact clonedContact)
        {
            FirstName = clonedContact.FirstName;
            LastName = clonedContact.LastName;
            FullName = clonedContact.FullName;

            Id = clonedContact.Id;
            CustomAttribute = clonedContact.CustomAttribute;
            if (clonedContact.Address != null)
            {
                Address = new Address(clonedContact.Address);
            }
            if (clonedContact.EmailAddresses != null)
            {
                EmailAddresses = new EmailAddresses(clonedContact.EmailAddresses);
            }
            if (clonedContact.PhoneNumbers != null)
            {
                PhoneNumbers = new PhoneNumbers(clonedContact.PhoneNumbers);
            }
        }
 private Address getAddress(SqlDataReader reader, List<string> fields)
 {
     Address address = new Address();
     
     foreach (string field in fields)
     {
         try {
             address.GetType().GetProperty(field).SetValue(address, reader[field], null);
         }
         catch(Exception ex)
         {
             throw new WebFaultException<string>(string.Format("Column <{0}> not found in query results: {1}", field, ex.Message), HttpStatusCode.InternalServerError);
         }            
     }
     return address;
 }