Код: Выделить всё
private ConcurrentDictionary myDic = new ConcurrentDictionary();
//Main thread at program startup
for(int i = 0; i < 4; i++)
{
myDic.Add(i, 0);
}
//Separate threads use this to update a value
myDic[InputID] = newLongValue;
Подробнее здесь: https://stackoverflow.com/questions/822 ... rect-usage
Мобильная версия