Skip to main content
ContactPickerUI.AddContact(Contact) | addContact(Contact) method

Applies to Windows only

Adds a Contact.

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

Syntax


var addContactResult = contactPickerUI.addContact(contact);

public AddContactResult AddContact(
  Contact contact
)

Public Function AddContact(
  contact As Contact 
) As AddContactResult

public:
AddContactResult AddContact(
  Contact^ contact
)

Parameters

contact

Type: Contact

An object that contains the contact's information.

Return value

Type: AddContactResult

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

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.ApplicationModel.Contacts.Provider
Windows::ApplicationModel::Contacts::Provider [C++]

Metadata

Windows.winmd

See also

ContactPickerUI
AddContact(String, Contact)