如何同步运行异步方法?

时间:2014-06-03 12:34:29

标签: c# asynchronous

在我的方法中:

void myMethod()
{
    // other stuff
    client.PostAsync(url, content);
}

我想发布一些内容,但在发送数据之前不要离开myMethod。无法使myMethod成为异步方法,那么如何在离开myMethod之前等待数据完全发送?

0 个答案:

没有答案
相关问题