标签:exec kde tca his public 如何 sync javascrip script
public void TestCallback(IJavascriptCallback javascriptCallback)
{
const int taskDelay = 1500;
Task.Run(async () => //异步标记(async )的lambda表达式,相当于异步函数(() =>lambda表达式相当于函数)
{
await Task.Delay(taskDelay);//await:所在函数必须为异步
await javascriptCallback.ExecuteAsync("This callback from C# was delayed " + taskDelay + "ms");
});
}
标签:exec kde tca his public 如何 sync javascrip script
原文地址:https://www.cnblogs.com/changbaishan/p/14870360.html