“严重性代码描述项目文件行抑制状态 错误CS1983异步方法的返回类型必须为void,任务,任务,类似任务的类型,IAsyncEnumerable或IAsyncEnumerator CapstoneUVTapEx C:\ Users \ Thor \ source \ repos \ CapstoneUVTapEx \ CapstoneUVTapEx \ MainForms \ Main.cs 103有效 “
public async bool CheckIfIDexist(int x)
{
try
{
FirebaseResponse firebaseResponse = await client.GetTaskAsync("user/" + x);
Data data = firebaseResponse.ResultAs<Data>();
int y = int.Parse(data.id);
if (x == y)
{
return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}