如何同时执行两项任务?

时间:2019-10-23 13:28:03

标签: c#

我想同时获得一个函数和一个返回值,或者我需要函数在返回后运行。

private void GiveBackInput(string s)
        {
            Thread.Sleep(125);
            SendKeys.SendWait(s);
        }
private bool idontrememberthisname(string hexcode){
 ... if (...)
         {    
          GiveBackInput("A");
          return true;
         }
//i need it to be like this
... if (...)
        {    
         return true;
         GiveBackInput("A");
         }}

编辑:忘了把if语句放在其他方法中

1 个答案:

答案 0 :(得分:1)