public LinkedListInt(params int[] values) { _first = null; foreach (var value in values) { Add(value); } }
public bool MoveNext() { if (_current == null && _first != null) { _current = _first; return(true); } if (_current.Next == null) { return(false); } _current = _current.Next; return(true); }
public void Reset() { _current = null; }
public IEnumerator <int> GetEnumerator() { _current = null; return(this); }
public void Add(int value) { _first = new IntNode(_first, value); }
public IntNode(IntNode next, int value) { Next = next; Value = value; }