public T this [int index] {
     get {
         if (index >= Count)
         {
             throw new ArgumentOutOfRangeException("index");
         }
         return(root.GetNodeAt(index).Value);
     }
 }
예제 #2
0
 public AvlNode <T> GetNodeAt(int index)
 {
     if (index < left._count)
     {
         return(left.GetNodeAt(index));
     }
     if (index > left._count)
     {
         return(right.GetNodeAt(index - left._count - 1));
     }
     return(this);
 }