Contact Constructor

Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Initializes a new instance of the Contact class.

Feature:  Microsoft.Live.Services
Namespace:  Microsoft.Live.Services

var instance = new Microsoft.Live.Services.Contact(nameOrEmail);


Type: Object

Describes a string that represents the firstName or a ContactEmail object to be added to the emails property.

An exception is thrown if you call the constructor with a parameter that is not a string that represents a firstName or a ContactEmail object. All other property values in the new instance of Contact are set to the value undefined (JavaScript) by default.

The following example demonstrates the creation of two contacts. One contact is initialized with a string, and the other contact is initialized with a ContactEmail object.

    var contact1 = new Microsoft.Live.Services.Contact("contact1");

    var contact2 = new Microsoft.Live.Services.Contact(
        new Microsoft.Live.Services.ContactEmail("").get_address()


The constructor was not called with a string or a ContactEmail object.

Windows Live Messenger Connect

Supported in: 4.1

Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.6, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 4.0, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0