ContactPickerUI.AddContact Method
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.
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)
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
|