Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Node
- {
- private int info;
- private Node next;
- public Node(int x)
- {
- this.info = x;
- this.next = null;
- }
- public Node(int x, Node next)
- {
- this.info = x;
- this.next = next;
- }
- public override string ToString()
- {
- return " " + this.info;
- }
- public void SetInfo(int x)
- {
- this.info = x;
- }
- public int GetInfo()
- {
- return this.info;
- }
- public void SetNext(Node next)
- {
- this.next = next;
- }
- public Node GetNext()
- {
- return this.next;
- }
- }
Add Comment
Please, Sign In to add comment