Example #1
0
 // Properties
 public StatPropStg this[string name]
 {
     get
     {
         StatPropStg statProp = new StatPropStg {
             PropName = name
         };
         int Idx = base.InnerList.IndexOf(statProp);
         if (Idx < 0)
         {
             throw new IndexOutOfRangeException();
         }
         return((StatPropStg)base.InnerList[Idx]);
     }
 }
Example #2
0
 public object this[StatPropStg stat]
 {
     get
     {
         if (stat.PropName == null)
         {
             return(this[stat.PropID]);
         }
         return(this[stat.PropName]);
     }
     set
     {
         if (stat.PropName == null)
         {
             this[stat.PropID] = RuntimeHelpers.GetObjectValue(value);
         }
         else
         {
             this[stat.Name] = RuntimeHelpers.GetObjectValue(value);
         }
     }
 }