Beispiel #1
0
 /// <summary>
 /// Retorna um elemento pelo seu index
 /// </summary>
 /// <param name="index"></param>
 /// <returns></returns>
 public T this[int index]
 {
     get { return((T)this.GetByIndex(index)); }
     set
     {
         Elemento val = this.GetElementoByIndex(index);
         val.SetDado(value);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Retorna um elemento pelo seu index
 /// </summary>
 /// <param name="index"></param>
 /// <returns></returns>
 public T this[int index]
 {
     get
     {
         T val = (T)this.GetByIndex(index);
         if (val == null)
         {
             throw new InvalidIndexException(this.ToString() + " line 41");
         }
         return(val);
     }
     set
     {
         Elemento val = this.GetElementoByIndex(index);
         val.SetDado(value);
     }
 }