You only need a normal resistor and a Light Dependent Resistor (LDR) which should be connected to the Netduino as shown in the schema.
With these few lines of code you can read the value from the LDR.
This code will open the A0 analog input port and read the value from it.
It returns a value between 0 and 100. 0 means bright and 100 means dark. In this example the value is inverted, so 0 means dark and 100 means bright.
public static void ReadLightSensor()
int minValue = 0;
int maxValue = 100;
int lightingInterval = 15 * 60 * 1000;
// Open the analog port
var lightSensor = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);
// Set the value range between 0 and 100
// Read the value and invert it: 0 = dark, 100 = bright
var lightSensorValue = maxValue – lightSensor.Read();
// Do something with the value