title: Overloading the subtraction operator for removing object
body: <pre><code>case Choices.ADD_PERSON:
                      Console.WriteLine("enter info for person to add.");
                      InfoForPerson();
                      PersonList Z = x + p;
                      break;
  
  case Choices.REMOVE_PERSON:
                      Console.WriteLine("enter info for person to remove: ");
                      InfoForPerson();
                      Z = x - p;
                      break;
  </code></pre>
  
  <p>Above are two things that occur if their options are selected from the menu. For <code>Choices.ADD_PERSON</code> the result is as expected, and a person is added. However, I assumed + &amp; - would function the exact same way, just inversely, but it hasn't occurred as such.</p>
  
  <pre><code>public static PersonList operator -(PersonList x, Person y)
      {
          PersonList temp = x;
          if (temp._Plist.Contains(y))
          {
              temp._Plist.Remove(y);
          }
          return temp; }
  </code></pre>
  
  <p>Above is my definition for the subtraction operator. Below is the code I was using to allow the user to choose the person to add/subtract.</p>
  
  <pre><code>public static void InfoForPerson()
      {
          Console.Write("Enter your name: ");
          string name = Console.ReadLine();
          string phone = ValidPhone();
          string email = ValidEmail();
          p = new Person(name, phone, email);
  </code></pre>
  
  <p>It works fine for the addition, just not the subtraction. I watched p and it's holding the data fine, but it's just not matching the item already in the List.</p>