コード例 #1
0
 /// <summary>
 /// Returns true if the specified vet exists.
 /// </summary>
 /// <param name="withName">The name of the vet to search for.</param>
 public bool ContainsVet(string withName)
 {
     Vet vet = new Vet (withName);
     return vets.Contains (vet);
 }
コード例 #2
0
 /// <summary>
 /// Removes the vet.
 /// </summary>
 /// <param name="vet">The name of the vet to be removed.</param>
 public void removeVet(string withName)
 {
     Vet vet = new Vet (withName);
     if (vets.Contains (vet))
         vets.Remove (vet);
 }
コード例 #3
0
 /// <summary>
 /// Adds the new vet to the database. Will fail if a vet with the same name
 /// already exists.
 /// </summary>
 /// <returns><c>true</c>, if new vet was added, <c>false</c> otherwise.</returns>
 /// <param name="newVet">New vet.</param>
 public bool addNewVet(Vet newVet)
 {
     if (vets.Contains (newVet))
         return false;
     vets.Add (newVet);
     return true;
 }