SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  public void Remove(Dog dog) // L3 1.2
  2.         {
  3.             for (int i = 0; i < this.Count; i++)
  4.             {
  5.                 if (this.dogs[i] == dog)
  6.                 {
  7.                     for (int j = i; j < this.Count; j++)
  8.                     {
  9.                         this.dogs[j] = this.dogs[j + 1];
  10.                     }
  11.                 }
  12.             }
  13.         }
  14.  
  15.         public void RemoveAt(int index) // L3 1.2
  16.         {
  17.             for (int i = 0; i < this.Count; i++)
  18.             {
  19.                 if (i == index)
  20.                 {
  21.                     for (int j = i; j < this.Count; j++)
  22.                     {
  23.                         this.dogs[j] = this.dogs[j + 1];
  24.                     }
  25.                 }
  26.             }
  27.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top