private async Task SendWithDelay(int delay, Action action) { await Task.Delay(delay); action(); } 

I use this function to change the value of the flag. That is, I have a variable that accepts true or false. And you need to change the value after a while. Is this method a priority? I do not use a timer, because this function is used very often.

  • You have already asked the same question about the same topic before. Why produce a few if you still don’t answer the clarifying questions? - AK
  • I answered, they did not answer me. - Kirill Meøw
  • Again, this type of question you can not get an answer. Why? Yes, because this method (two lines long) says nothing. The context in which it is used is important. Have you read the comment by Alexander Petrov on your previous question on this topic? What do you say? Why do you need a boolean flag? - Bulson 6:22 pm

0