Welcome to the forums and congrats on the Netduino purchase. I don't have time to adapt the code for you (and you won't learn that way, anyway), but I'll try to give you some pointers in the form of pseudo-code:
1. For C#, you need to use a namespace and a main class for your program.
2. There is no "Setup" function like there is on the Arduino. You need to use methods to define all of the functions that you want to use.
Here is a pseudo-code example:
namespace serialLCD // The namespace
{
public class LCD // The class
{
public LCD() // The class constructor
{
initSerial(); // Call the initialization code for the serial port
initLCD(); // Call the initialization code for the LCD
}
private void initSerial()
{
// Initialization code for the serial port goes here
}
private void initLCD()
{
// set the size of the display if it isn't 16x2 (you only have to do this once)
// This is the Arduino code and won't work. This is here to show you what needs to be done in this method.
// The Netduino code will be different
lcd.write(0xFE);
lcd.write(0xD1);
lcd.write(16); // 16 columns
lcd.write(2); // 2 rows
delay(10);
}
// More methods needed here for brightness, contrast, etc. You also have to have a main method for the program to call all of this stuff.
If you're serious about learning C#, I recommend a book called "Essential C#" by Mark Michaelis. It's a fantastic book, and it's one of the only resources you'll ever need for the C# language.
I'm sorry that I don't have time to adapt the code for you and show you how it's done, but I can certainly answer any question that you pose in this thread.
Hope I helped a little...