Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying To Understand Events
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01382673
Message ID:
01382864
Vues:
40
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform