public Node(T value, Node<T> next)
public void SetValue(T value)
public void SetNext(Node<T> next)
return this.next != null;
public override string ToString()
return this.first == null;
return this.first.GetValue();
this.last.SetNext(new Node<T>(x));
this.last = this.last.GetNext();
this.last = new Node<T>(x);
T x = this.first.GetValue();
this.first = this.first.GetNext();
public override string ToString()
Node<T> pos = this.first;
public Dog(string name,int age)
public string GetName(){return this.name;}
public int GetAge(){return this.age;}
public void SetName(string name){this.name=name;}
public void SetAge(int age){this.age=age;}
public static void Main()