i am using Visual Studio 2010 C++ Express and i mant to add an item to my ConcurrentDictionary:
i have such code:
String^ key = gcnew String("key");
int value = 123;
myDictionary->AddOrUpdate(key,value,/*WHAT TO ADD HERE?*/);
AddOrUpdate Method takes 3 argument, not like normal Dictionary 2.
Microsoft sites says it takes such arguments:
public:
TValue AddOrUpdate(
TKey key,
TValue addValue,
Func<TKey, TValue, TValue>^ updateValueFactory
)
on microsoft sites i also found code in C#:
cd.AddOrUpdate(1, 1, (key, oldValue) => oldValue + 1);
but it does not work in C++. what i must put as 3rd argument?