|
|
|
|
|
by pjmlp
3155 days ago
|
|
You can simulate something like that using lambdas in C#. Something like withLock(counter, (num) => {
return num + 1;
});
or in alternative, withLock(counter, (ref num) => {
num++;
});
If C# allowed for trailing lambdas it could look better. |
|