Ejemplo n.º 1
0
 /// <summary>  implements the - operator to remove names from the list</summary>
 /// <param name="CurrNameList">  the NameList to Remove From</param>
 /// <param name="NameToRemove">  the name being removed from NameList</param>
 /// <returns>  the namelist after the name is removed</returns>
 public static NameList operator-(NameList CurrNameList, Name NameToRemove)
 {
     if (CurrNameList.Names.Contains(NameToRemove)) //if list contains name
     {
         CurrNameList.Names.Remove(NameToRemove);   //removes the name
     }
     CurrNameList.ListChange();
     return(CurrNameList);
 }
Ejemplo n.º 2
0
 /// <summary>  implements the + operator to add names to the list</summary>
 /// <param name="CurrNameList">  the NameList being added to</param>
 /// <param name="NewName"> The name being added to the NameList</param>
 /// <returns>  returns the NameList that was added to</returns>
 public static NameList operator+(NameList CurrNameList, Name NewName)
 {
     CurrNameList.Names.Add(NewName); //adds name to name list
     CurrNameList.ListChange();
     return(CurrNameList);            //returns current name list
 }