how do I drive the UART2 of my gadgeteer mountaineer eth?
The gadgeteer works with the socket, while the examples are all using the SerialPort.
Thank you.

Not sure how new you are this, so excuse if this is stating the obvious : An easy trick to find out which sockets support serial is simply to drag a serial port device onto the Gadgeteer Designer and then to click on its socket to see where it can connect.

If you want to get the COM port for the socket that you are currently using as a string to pass to a method, use:

string COMPort = GT.Socket.GetSocket(/*number of socket that you want to use*/, true, null, null).SerialPortName;

If you want to use a Mountaineer mainboard directly with “plain vanilla” NETMF, without the Gadgeteer libraries, then the pin assignment table should be helpful:

There you can see, for example, that the signals of the microcontroller’s UART2 can be found on socket 3.

This document, along with other useful stuff, is on the following page: