public static void Run() { try { GoogleTestUser User2 = new GoogleTestUser("user", "email address", "password", "clientId", "client secret"); string accessToken; string refreshToken; GoogleOAuthHelper.GetAccessToken(User2, out accessToken, out refreshToken); // Get IGmailclient using (IGmailClient client = GmailClient.GetInstance(accessToken, User2.EMail)) { Contact[] contacts = client.GetAllContacts(); Contact contact = contacts[0]; // ExStart:DeleteGmailContact client.DeleteContact(contact.Id.GoogleId); // ExEnd:DeleteGmailContact } } catch (Exception ex) { Console.WriteLine(ex.Message); } }