Could some one help me with a conversion error I'm receiving. I'm trying to get the weather using webserviceX.net and I get the following error when I try to compile. By the way this is a ASP.NET 2.0 app.
Cannot implicitly convert type 'net.webservicex.www.WeatherData[]' to 'net.webservicex.www.WeatherData'
Here is the code I'm using.
Expand|Select|Wrap|Line Numbers
- net.webservicex.www.WeatherForecast forcast = new net.webservicex.www.WeatherForecast();
- net.webservicex.www.WeatherForecasts forcasts = new net.webservicex.www.WeatherForecasts();
- net.webservicex.www.WeatherData data = new net.webservicex.www.WeatherData();
- forcasts = forcast.GetWeatherByZipCode("07747");
- data = forcasts.Details;
- TextBox1.Text = data.ToString();
Thank you.