No, this is not such a basic question. I make an application and get scenerio, like, the file will be uploaded, then it will be uploaded to the FTP server, then the local copy will be deleted, then one entry will be placed in the dictionary for this file name. So the code below
public void download_This_WebPage(string url, string cookies_String, string local_Saving_File_Name_With_Path) { WebClient wb = new WebClient(); wb.Headers.Add(HttpRequestHeader.Cookie, cookies_String);
But I do not know how to pass this file name to the download_Completed event handler. Can anyone help me on this
EDIT: Thanks for the answers from Darina and Frederick. Is there any general way to pass user data to an event handler (already defined) as shown below.
void main_Fn() { string my_Data = "Data"; some_object a = new some_object(); some_Object.click_event += new eventHandler(click_Happened); (Assume that the event passes two ints, I also want to pass the string "my_Data" to "click_Happened") some_object.start(); } void click_Happened(int a, int b) {
In short, how to trick a signature?
source share