public object this[int index] { get { if (index < 0 || index >= this.Count) { throw new ArgumentOutOfRangeException(); } return(SharpTreeNode.GetNodeByVisibleIndex(root, includeRoot ? index : index + 1)); } set { throw new NotSupportedException(); } }
public object this[int index] { get { if (index < 0 || index >= this.Count) { throw new ArgumentOutOfRangeException(); } SharpTreeNode node; if (nodeCache.TryGetValue(index, out node)) { return(node); } node = SharpTreeNode.GetNodeByVisibleIndex(root, includeRoot ? index : index + 1); nodeCache[index] = node; return(node); } set { throw new NotSupportedException(); } }