Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying To Understand Events
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01382673
Message ID:
01382923
Views:
37
Yes, I noticed that too. Not enough morning coffee.





>>Excellent. Thanks.
>>
>>However, I'm now getting the same error at runtime on this line in my class:
>>
>
>I was just looking at your original code - you're hooking up the event after you call the method which raises the event (which means the event is null - per my suggestion to write code which checks to see if it's null before raising the event).
>
>If you change the order of the code it should work:
>
>
>            BankAccounts oBank = new BankAccounts();
>            oBank.ReaderRetreived += new ReaderRetreivedEvent(ReaderRetreived);  // COMPILE ERROR HERE
>            oReader = oBank.GetReader("select * from registers");
>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform