public List<Address> GetAddresses() { List<Address> addresses = new List<Address>(); Address address1 = new Address("解放路", "宁波", "中国", 315000); Address address2 = new Address("中山路", "杭州", "中国", 31000); Address address3 = new Address("人民路", "温州", "中国", 31000); addresses.Add(address1); addresses.Add(address2); addresses.Add(address3); return addresses; }
public Address GetAddress(string street, string city, string country, int zip) { Address address = new Address(street, city, country, zip); return address; }