understood correctly. If I want to have parametrized method (Action/Func delegate pointing at parametrized method), then the only way is
1) to use object state
2) Or either call methods inside void
?
Not sure I understand you. Show some code, we will tell you if it can be improved or simplified
I don't know about the first. As for the second option, yes. You must say for example object Val = "whatever"; Task.Run(() => function(Val)); And in this case, it's better to use await to avoid calling the val if it's going to locked
Обсуждают сегодня