ContactPickerUI.AddContact Method

Definition

Overloads

AddContact(Contact)

Adds a Contact.

AddContact(String, Contact)

Adds a Contact.

Note

AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.

AddContact(Contact)

Adds a Contact.

public:
 virtual AddContactResult AddContact(Contact ^ contact) = AddContact;
AddContactResult AddContact(Contact const& contact);
public AddContactResult AddContact(Contact contact);
function addContact(contact)
Public Function AddContact (contact As Contact) As AddContactResult

Parameters

contact
Contact

An object that contains the contact's information.

Returns

An AddContactResult-typed value that indicates whether the contact was added successfully.

Windows requirements

App capabilities
contactsSystem

Remarks

Note

The Contact.Id property must be set when you call AddContact. If Contact.Id isn't set, your app will fail.

See also

Applies to

AddContact(String, Contact)

Adds a Contact.

Note

AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.

public:
 virtual AddContactResult AddContact(Platform::String ^ id, Contact ^ contact) = AddContact;
/// [Windows.Foundation.Metadata.Deprecated("AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
AddContactResult AddContact(winrt::hstring const& id, Contact const& contact);
/// [Windows.Foundation.Metadata.Deprecated("AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
AddContactResult AddContact(winrt::hstring const& id, Contact const& contact);
[Windows.Foundation.Metadata.Deprecated("AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public AddContactResult AddContact(string id, Contact contact);
[Windows.Foundation.Metadata.Deprecated("AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public AddContactResult AddContact(string id, Contact contact);
function addContact(id, contact)
Public Function AddContact (id As String, contact As Contact) As AddContactResult

Parameters

id
String

Platform::String

winrt::hstring

The ID for the contact.

contact
Contact

An object that contains the contact's information.

Returns

An AddContactResult-typed value that indicates whether the contact was added successfully.

Attributes

Windows requirements

App capabilities
contactsSystem

See also

Applies to