Id | id property
Collapse the table of content
Expand the table of content

ContactRemovedEventArgs.Id | id property

Contains a unique identifier for the contact.

Syntax


var id = contactRemovedEventArgs.id;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A unique identifier for the contact.

Remarks

When you work with contacts, you must supply an ID property for each contact. The value of this property can be whatever makes the most sense for your app, but it must enable you to uniquely identify each contact. Actions like removing a contact depend on this ID value to ensure that the correct contact is removed. For a complete example, see our code sample.

Examples

The following example shows one way to use the Id property of the ContactRemovedEventArgs class.


function onContactRemovedFromBasket(e) {
    var removedContactDiv = document.createElement("div");
    removedContactDiv.innerText = "Contact ID: " + e.id + " has been removed.";
    document.body.appendChild(removedContactDiv);
}


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

ContactRemovedEventArgs

 

 

Show:
© 2016 Microsoft