public class MyList { private MyListNode first, last; private int _length; public int Length {get {return _length;}} public void Add(T item) { var node = new MyListNode {Value = item}; ++_length; if(first == null) { first = node; last = node; return; } last.Next = node; last = node; } public T Get(int pos) { if(pos >= _length) return null; var current = first; for(int i = 0; i < pos; ++i) { current = current.Next; } return current.Value; } private class MyListNode { public T Value {get; set;} public MyListNode Next {get; set;} } }