You get the error because you don't return any value using a
return
statement. If you don't need to return something, change
object
into
void
in your method:
private void browsebutton_Click(object sender, DownloadStringCompletedEventArgs e, dynamic browseurl, int browsingitem)
If you need to return something, use a
return
statement at the end of your method:
return theObjectThatYouWantToReturn;
[Edit]
You said in your comment that you have still a problem. Here is how to fix it:
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler((sndr, ev) => wc_DownloadStringCompletedbrowse(sndr, ev, browseurl, browsingitem));