📌  相关文章
📜  无法将类型“int”隐式转换为“System.Threading.Tasks.Task”<int> &#39; - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:22.281000             🧑  作者: Mango

代码示例1
int count;
// use Task.FromResult with retuned value
return Task.FromResult(count);

// Or make your method async, and await the returned value
private async Task ReturnInterger(){}

// Or take care of it while declaring the variable
var count = Task;