Click here to Skip to main content
15,917,731 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to break from an If Statement Pin
_AK_30-Aug-06 19:56
_AK_30-Aug-06 19:56 
AnswerRe: How to break from an If Statement Pin
Guffa30-Aug-06 21:13
Guffa30-Aug-06 21:13 
AnswerRe: How to break from an If Statement Pin
Pooja k30-Aug-06 19:25
Pooja k30-Aug-06 19:25 
GeneralRe: How to break from an If Statement Pin
Guffa30-Aug-06 19:46
Guffa30-Aug-06 19:46 
AnswerRe: How to break from an If Statement Pin
Pooja k30-Aug-06 20:00
Pooja k30-Aug-06 20:00 
AnswerRe: How to break from an If Statement Pin
Martin#30-Aug-06 20:47
Martin#30-Aug-06 20:47 
Questionwhy do the custom written events NEED to have a client?? Pin
michal.kreslik30-Aug-06 17:44
michal.kreslik30-Aug-06 17:44 
AnswerRe: why do the custom written events NEED to have a client?? Pin
Qhalis30-Aug-06 19:05
Qhalis30-Aug-06 19:05 
From the code, it looks like you should be getting an unhandled null reference exception in FireOffFirstEvent() when you do not register the events. This is correct.

When you create the instance of EventsClass, FirstEvent is null. If you do not register the events it is never set.

You call FireOffAllEvents()
which calls FireOffFirstEvent()
which calls FirstEvent() - which is null

One way to solve this is place a check around the delegate invocation, e.g.

private void FireOffFirstEvent() {
if (null != FirstEvent) {
FirstEvent();
}
}

Q.


GeneralRe: why do the custom written events NEED to have a client?? Pin
michal.kreslik30-Aug-06 20:07
michal.kreslik30-Aug-06 20:07 
GeneralRe: why do the custom written events NEED to have a client?? Pin
mav.northwind30-Aug-06 20:19
mav.northwind30-Aug-06 20:19 
Questionmulticolumn combobox Pin
Amar Chaudhary30-Aug-06 16:36
Amar Chaudhary30-Aug-06 16:36 
AnswerRe: multicolumn combobox Pin
Nader Elshehabi31-Aug-06 1:43
Nader Elshehabi31-Aug-06 1:43 
GeneralRe: multicolumn combobox Pin
Amar Chaudhary31-Aug-06 15:28
Amar Chaudhary31-Aug-06 15:28 
QuestionDataSets Modifying Data Pin
Expert Coming30-Aug-06 16:03
Expert Coming30-Aug-06 16:03 
AnswerRe: DataSets Modifying Data Pin
Muammar©10-Sep-06 0:31
Muammar©10-Sep-06 0:31 
QuestionMatlab to C# Pin
signimage30-Aug-06 16:02
signimage30-Aug-06 16:02 
AnswerRe: Matlab to C# Pin
Expert Coming30-Aug-06 16:06
Expert Coming30-Aug-06 16:06 
Questioncrestal report Pin
TAREQ F ABUZUHRI30-Aug-06 13:59
TAREQ F ABUZUHRI30-Aug-06 13:59 
AnswerRe: crestal report Pin
Judah Gabriel Himango30-Aug-06 14:08
sponsorJudah Gabriel Himango30-Aug-06 14:08 
GeneralRe: crestal report Pin
TAREQ F ABUZUHRI30-Aug-06 21:18
TAREQ F ABUZUHRI30-Aug-06 21:18 
GeneralRe: crestal report Pin
gus_br31-Aug-06 7:36
gus_br31-Aug-06 7:36 
AnswerRe: crestal report Pin
gus_br30-Aug-06 16:09
gus_br30-Aug-06 16:09 
AnswerRe: crestal report Pin
Glen Harvy31-Aug-06 13:10
Glen Harvy31-Aug-06 13:10 
GeneralRe: crestal report Pin
gus_br31-Aug-06 15:36
gus_br31-Aug-06 15:36 
GeneralRe: crestal report Pin
Glen Harvy31-Aug-06 17:41
Glen Harvy31-Aug-06 17:41 

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.