Thursday, December 22, 2011

[Dev] Defining an event on the .Net Micro Framework

I was just defining an event while working on an application on my Netduino Plus. But the default EventHandler delegate was unknown ...

Searching the internet did not directly help me on the subject and so I decided to add a short post on my blog to help the next people running into the same problem.

The delegate is defined in the Microsoft.SPOT.TinyCore assembly, so just add that assembly and you're good to go.

UPDATE:
I just ran into a problem when deploying my solution to the Netduino Plus. The program had a total size of 66336 bytes which is too big ! After removing the reference to the TinyCore assembly and added the delegate (public delegate void EventHandler(object sender, EventArgs e)) to my program it ended up to a total of 2560 bytes. So no adding of additional assemblies !

No comments:

Post a Comment