コード例 #1
0
 /// <summary>
 /// Include an indexer.
 /// </summary>
 /// <param name=""></param>
 /// <returns></returns>
 public int this[int par_index]
 {
     //
     //  https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/
     //
     get
     {
         //return mod_firstItem.GetValue_ByIndex(par_index).Value;
         return(mod_firstItem.GetValue_ByIndex(par_index));
     }
     set
     {
         mod_firstItem.SetValue_ByIndex(par_index, value);
     }
 }
コード例 #2
0
 public int GetValue_ByIndex(int par_index)
 {
     //
     //Added 3/2/2020 thomas downes
     //
     if (par_index == 0)
     {
         return(this.Value);
     }
     else if (NextValue != null)
     {
         par_index--;
         return(NextValue.GetValue_ByIndex(par_index));
     }
     throw new InvalidOperationException("Indexing error!!");
 }