ABPersonAddressKey Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains keys for the components of a postal address.
public static class ABPersonAddressKey
type ABPersonAddressKey = class
- Inheritance
-
ABPersonAddressKey
Remarks
A single NSDictionary instance stores a single address, with the dictionary keys and values holding different parts of the address:
// Address from: https://en.wikipedia.org/wiki/Address_(geography)#United_States
NSDictionary address = NSDictionary.FromObjectsAndKeys(
new NSObject[]{
new NSString("455 Larkspur Dr."),
new NSString("California Springs"),
new NSString("CA"),
new NSString("92926"),
new NSString("USA"),
new NSString("us"),
},
new NSObject[]{
ABPersonAddressKey.Street,
ABPersonAddressKey.City,
ABPersonAddressKey.State,
ABPersonAddressKey.Zip,
ABPersonAddressKey.Country,
ABPersonAddressKey.CountryCode,
}
);
ABMutableDictionaryMultiValue addresses = new ABMutableDictionaryMultiValue() {
{ address, ABLabel.Home },
};
ABPerson person = GetMeSomePerson();
person.SetAddresses(addresses);
Properties
| Name | Description |
|---|---|
| City |
Gets the key for the city component of an address. |
| Country |
Gets the key for the country component of an address. |
| CountryCode |
Gets the key for the country-code component of an address. |
| State |
Gets the key for the state or province component of an address. |
| Street |
Gets the key for the street component of an address. |
| Zip |
Gets the key for the postal-code component of an address. |