//Adds a new node at the top of the stack public void addFirst(string newString) { StringNode newNode = new StringNode(newString); newNode.Next = head; head = newNode; }
public string deleteFirst() { string data = null; StringNode toDelete = new StringNode(data); toDelete = head; head = head.Next; return toDelete.Data; }
public string deleteFirst() { string data = null; StringNode toDelete = new StringNode(data); toDelete = head; head = head.Next; return(toDelete.Data); }
public int Count() { int count = 0; StringNode nodeWalker = head; while (nodeWalker != null) { count++; nodeWalker = nodeWalker.Next; } return(count); }
//Adds a new node at the top of the stack public void addFirst(string newString) { StringNode newNode = new StringNode(newString); newNode.Next = head; head = newNode; }
public StringNodeList() { head = null; }
public StringNode(string data) { Data = data; Next = null; }
public StringNodeList() { head = null; }