代码:
private async Task HomeMoreButton_ClickAsync(object sender, EventArgs e)
{
InfoLabel_YearOfRelease.Show();
using (var httpClient = new HttpClient())
{
var Json = await httpClient.GetStringAsync("http://www.omdbapi.com/?apikey=......=" + InfoNameOfShow.Text
+ "&type=" + InfoTypeOfShow.Text.ToLower());
var ShowsExtendedInfo = new JavaScriptSerializer().Deserialize<ShowsExtendedInfo>(Json);
InfoLabel_YearOfRelease.Text = ShowsExtendedInfo.Year;
}
}
错误:
CS0407 '任务Home.HomeMoreButton_ClickAsync(object,EventArgs)'具有错误的返回类型
在线:
this.HomeMoreButton.Click + = new System.EventHandler( this.HomeMoreButton_ClickAsync );
我四处走动,但从未遇到此错误,也找不到任何在线帮助我的东西。