public void run() { Peanut = Head; tail = Fido; Peanut.DogName = "Peanut"; Peanut.DogBreed = "Bichon"; Peanut.nextDog = fifi; Peanut.prevDog = null; Fifi.DogName = "fifi"; Fifi.DogBreed = "poodle"; Fifi.nextDog = jordan; jordan.DogName = "jordan"; jordan.DogBreed = "germanshepperd"; jordan.nextDog = Fido; Fido.DogName = "fido"; Fido.DogBreed = "beagle"; Fido.nextDog = null; Fido.DogName = "fifi"; Fido.DogBreed = "poodle"; Fido.nextDog = roy; }
public void WalkOverTheList() { current = Head; while (current != null) { Console.WriteLine(current.DogName); current = current.nextDog; } }