Beispiel #1
0
 public void Add(Country dataToFind, Country afterData)
 {
     if (this.Next == null)
     {
         Console.WriteLine("Не найдено!");
         return;
     }
     if (this.Data.GetName() == dataToFind.GetName() && this.Data.GetPopulation() == dataToFind.GetPopulation())
     {
         Node2 node = new Node2(afterData);
         node.Next = this.Next;
         node.Pred = this;
         this.Next = node;
         return;
     }
     this.Next.Add(dataToFind, afterData);
 }
Beispiel #2
0
 public Node2(Country data)
 {
     Data = data;
     Next = null;
     Pred = null;
 }
Beispiel #3
0
 public Node2()
 {
     Data = default(Country);
     Next = null;
     Pred = null;
 }