Hello, here's my code:
public string[] SearchForMovie(string SearchParameter)
{
WebClientX.DownloadDataCompleted += new
DownloadDataCompletedEventHandler(WebClientX_DownloadDataCompleted);
WebClientX.DownloadDataAsync(new Uri(
"http://www.imdb.com/find?s=all&q=ironman+&x=0&y=0"));
string sitesearchSource = Encoding.ASCII.GetString(Buffer);
}
void WebClientX_DownloadDataCompleted(object sender,
DownloadDataCompletedEventArgs e)
{
Buffer = e.Result;
throw new NotImplementedException();
}
I get this exception:
The matrix cannot be null. Refering to my byte[] variable Buffer.
So, I can conclude that the DownloadDataAsync isn't really downloading anything. What is causing this problem?
PS. How can I easily format my code so it appear properly indented here. Why can't I just copy past the code from Visual C# express and maintain the indentation here? Thanks! :D