Пример #1
0
 public void SetEntry(StrategyMemoEntry entry)
 {
     int index = Entries.FindIndex(ent => ent.Species == entry.Species);
     if (index > 0)
         Entries[index] = entry;
     else
         Entries.Add(entry);
 }
Пример #2
0
        public void SetEntry(StrategyMemoEntry entry)
        {
            int index = Array.FindIndex(Entries.ToArray(), ent => ent.Species == entry.Species);

            if (index > 0)
            {
                Entries[index] = entry;
            }
            else
            {
                Entries.Add(entry);
            }
        }