【发布时间】:2012-12-20 20:22:00
【问题描述】:
我正在尝试让剧院和电影出现在我的 txtResults.Text 框中。
这是我现在的代码...
MovieInformation MI = new MovieInformation();
int rad = int.Parse(txtRadius.Text);
txtResults.Text = MI.GetTheatersAndMovies(txtZip.Text, rad);
错误是:错误无法将类型'WebShowTimes.movies.Theater[]'隐式转换为'字符串'
【问题讨论】:
-
错误信息非常简单。查看
GetTheatersAndMovies的定义,看看它需要什么参数。 -
检查 `GetTheatersAndMovies' 方法,看看它需要多少参数。它要么取零,要么大于一......
-
好的,现在该方法返回一个 Theatre 对象数组,您正试图将其填充到一个字符串中。
标签: c# xml web-services http httpwebrequest