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:
01382864
Views:
41
>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");
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform