I'm running into memory issues because I have a collection that continues to grow. What I need to do is only keep about 15 items of each occurence in a list, so my idea is to find all the occurences where a value is equal to a supplied argument and then remove that index (reverse of course). My question, is how do you find all occurences? Below finds 1 occurence.
Код: Выделить всё
public static void CleanTrackers()
{
foreach (var ticker in tickersToWatchForAHPM)
{
var fullTrackers = QouteTrackers.FindIndex(x => x.Ticker == ticker);
}
}
Источник: https://stackoverflow.com/questions/781 ... ls-a-value
Мобильная версия