Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
QuestionRemoting Pin
Diego F.9-May-07 5:18
Diego F.9-May-07 5:18 
QuestionExplorer, "Open with..." multiple files Pin
AlexZieg719-May-07 5:06
AlexZieg719-May-07 5:06 
AnswerRe: Explorer, "Open with..." multiple files Pin
AlexZieg719-May-07 7:22
AlexZieg719-May-07 7:22 
AnswerRe: Explorer, "Open with..." multiple files Pin
Luc Pattyn9-May-07 7:50
sitebuilderLuc Pattyn9-May-07 7:50 
GeneralRe: Explorer, "Open with..." multiple files Pin
AlexZieg719-May-07 8:42
AlexZieg719-May-07 8:42 
GeneralRe: Explorer, "Open with..." multiple files Pin
Luc Pattyn9-May-07 8:55
sitebuilderLuc Pattyn9-May-07 8:55 
QuestionEvent Handlers :) Pin
Justin Perez9-May-07 4:50
Justin Perez9-May-07 4:50 
AnswerRe: Event Handlers :) Pin
Bijesh9-May-07 6:47
Bijesh9-May-07 6:47 
I think any msdn article on event handlers should help you out. But from the code it looks like you are trying to assign the event itself as the handler. Normally you would write a method which has the same signture as your delegate. That method will be your event handler. Something like

public delegate void GNISImportFileEventHandler(object sender, ImportFileEventArgs e);<br />
public event GNISImportFileEventHandler OnImportFile;<br />
<br />
public void myGNISImportFileEventHandler(object sender, ImportFileEventArgs e)<br />
{<br />
//my event handling code<br />
}


And you would add the handler like:

myObj.OnImportFile += new GNISImportFileEventHandler(myGNISImportFileEventHandler);
modified: added "myObj." Assuming myObj is the object of your ImportFile class. It could be this. if you are adding it to the same object (which is really not needed since you can just call the method directly..
GeneralRe: Event Handlers :) Pin
Justin Perez9-May-07 8:20
Justin Perez9-May-07 8:20 
GeneralRe: Event Handlers :) Pin
Bijesh9-May-07 23:19
Bijesh9-May-07 23:19 
Questiontraversing treeView Pin
Maddie from Dartford9-May-07 3:49
Maddie from Dartford9-May-07 3:49 
AnswerRe: traversing treeView Pin
Tarakeshwar Reddy9-May-07 3:53
professionalTarakeshwar Reddy9-May-07 3:53 
Questionparse dat from html table Pin
samerh9-May-07 3:26
samerh9-May-07 3:26 
AnswerRe: parse dat from html table Pin
Elina Blank9-May-07 4:22
sitebuilderElina Blank9-May-07 4:22 
AnswerRe: parse dat from html table Pin
marky7779-May-07 4:36
marky7779-May-07 4:36 
QuestionData access layer code generator , Reccomendations ? Pin
Andrew Torrance9-May-07 3:22
Andrew Torrance9-May-07 3:22 
AnswerRe: Data access layer code generator , Reccomendations ? Pin
LongRange.Shooter9-May-07 10:29
LongRange.Shooter9-May-07 10:29 
QuestionDataTable to Excel Worksheet fst! Pin
swjam9-May-07 2:53
swjam9-May-07 2:53 
QuestionRecord desktop Pin
MHASSANF9-May-07 2:27
MHASSANF9-May-07 2:27 
AnswerRe: Record desktop Pin
Colin Angus Mackay9-May-07 3:02
Colin Angus Mackay9-May-07 3:02 
AnswerRe: Record desktop Pin
daphne579-Aug-11 17:48
daphne579-Aug-11 17:48 
QuestionHow to generate a shorter encrypted string? Pin
Affan Toor9-May-07 2:12
Affan Toor9-May-07 2:12 
AnswerRe: How to generate a shorter encrypted string? Pin
Tarakeshwar Reddy9-May-07 2:59
professionalTarakeshwar Reddy9-May-07 2:59 
GeneralRe: How to generate a shorter encrypted string? Pin
Affan Toor9-May-07 3:06
Affan Toor9-May-07 3:06 
Questiontag clouds for C#? Pin
Don Rolando9-May-07 1:30
Don Rolando9-May-07 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.