Skip to main content


The ClearContact method clears the information currently displayed on the Edit Contact Information GUI panel. It also closes curContact. Clicking Clear invokes ClearContact. The method does the following:

  1. Clears the Edit Contact Information text boxes.

  2. If curContact is not null it closes curContact and sets the reference to null.

Here is the method. Add the body of the method to the ClearContact stub in PhoneFormObj.cs.

private void ClearContact()
  txtConId.Text = "";
  txtConName.Text = "";
  if (curContact != null)
    curContact = null;

FeedbackOpens in a new tab