ContactField 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.
Describes a piece of contact data.
public ref class ContactField sealed : IContactField
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Contacts.IContactFieldFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ContactField final : IContactField
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Contacts.IContactFieldFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ContactField final : IContactField
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Contacts.IContactFieldFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ContactField : IContactField
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Contacts.IContactFieldFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ContactField : IContactField
function ContactField(name, value, type, category)
Public NotInheritable Class ContactField
Implements IContactField
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
App capabilities |
contactsSystem
|
Remarks
Each time you create a Contact object, you get a Fields property. This property contains the data that relates to the contact. To populate a Contact object with data, you append the Fields object with one or more instances of ContactField.
At a minimum, a ContactField object must contain a string value and a ContactFieldType, which specifies whether the data is a phone number, email address, physical address, or something else. You can also add a ContactFieldCategory to differentiate between home, work, personal, or other data. You can also use a ContactField object to add custom fields to a Contact.
Constructors
ContactField(String, ContactFieldType, ContactFieldCategory) |
Note IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail. Creates a new ContactFieldobject. |
ContactField(String, ContactFieldType) |
Note IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail. Creates a new ContactFieldobject. |
ContactField(String, String, ContactFieldType, ContactFieldCategory) |
Note IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail. Creates a new ContactFieldobject. |