Guest User

Untitled

a guest
Jun 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. public class Node
  2. {
  3.     private int info;
  4.     private Node next;
  5.     public Node(int x)
  6.     {
  7.         this.info = x;
  8.         this.next = null;
  9.     }
  10.     public Node(int x, Node next)
  11.     {
  12.         this.info = x;
  13.         this.next = next;
  14.     }
  15.     public override string ToString()
  16.     {
  17.         return " " + this.info;
  18.     }
  19.     public void SetInfo(int x)
  20.     {
  21.         this.info = x;
  22.     }
  23.     public int GetInfo()
  24.     {
  25.         return this.info;
  26.     }
  27.     public void SetNext(Node next)
  28.     {
  29.         this.next = next;
  30.     }
  31.     public Node GetNext()
  32.     {
  33.         return this.next;
  34.     }
  35. }
Add Comment
Please, Sign In to add comment