How to delete recently created Google Contact?

Posted by Preeti on Stack Overflow See other posts from Stack Overflow or by Preeti
Published on 2010-04-20T12:04:07Z Indexed on 2010/04/29 1:57 UTC
Read the original article Hit count: 405

Filed under:
|
|

Hi,

I am temporary creating one contact and immediatly after that i want to delete that contact. I am creating contact as follows:

ContactEntry[] ContactEntry = new ContactEntry[2];
ContactEntry[0] = new ContactEntry();
ContactEntry[0].Title.Text = "Temp";

Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default"));
ContactEntry createdEntry = (ContactEntry)obj_ContactService.Insert(feedUri, ContactEntry[0]); 

In order to delete above contact if i use:

ContactEntry[0].Delete();

It is throwing Exception : "No Service object set".

Note: I am using Google Apps API Ver 2 for .NET

Thanx

© Stack Overflow or respective owner

Related posts about c#

Related posts about contacts