public void TrackCurrency(string _name, byte _type, long _value) { for (int i = 0; i < syncStatistics.Count; i++) { if (syncStatistics[i].GetMatch(_name, _type)) { StatisticSyncStruct entry = syncStatistics[i]; entry.value += _value; syncStatistics[i] = entry; return; } } AddEntry(_name, _type, _value); }
public void AddEntry(string _name, byte _type, long _value) { StatisticSyncStruct syncStruct = new StatisticSyncStruct(_name, _type, _value); syncStatistics.Add(syncStruct); }