Examples of class and reference?


I want to use the SerialPort.DataReceived Event so i take the code of the last example in the msdn library site :

I add in the reference part of the project mscorlib, system, Microsoft.SPOT.Native, Microsoft.SPOT.hardware.serialports, system.io.

And I’ve a lot of errors on SerialDataReceivedEventHandler, Console, Parity, Stopbits, ReadExisting …

So i don’t understand why i could have so many errors with the last code example …

And is there a simple way to discover which reference i’ve to add to to project to make working the “console class” ? In the documentation is write to add “mscorlib in system” but it doesn’t work.

I’m using visual c# 2010 and framework 4.1. My project is a micro framework console application type.

Which error i’ve done ?

thanks for your help

The example you have pointed out is for full .Net Framework.
Check MicroFramework version of the example.

Welcome to the forum!

thanks you !
i’ve found this example. All works fine.

Great! I am glad it is working now.