Dunno if it will totally solve the problem but try something like this instead:
edit: I’m surprised the orginal code even compiles… Did C# change since I learned how to do events? I thought you always had to have a delegate in there…
@ ddurant - the delegate will be inferred if it is not present. You can leave it in for clarity/readability, but it is not required. If the handler’s signature is not correct, you will get a compile error.
I just did an exact replication of your problem, and mine ran fine. Could you give me more information about your program? Is that all that is going on in it right now?
Also, note that the error printed out
is incorrect and will change to the correct output soon. The correct output is “Error mounting SD card - no card detected.”, So that gives you something to look into. Try a different card if you have one.
I just bought a new SD Card (2 GB), and tried it, nothing change, the card is not detected and cannot be mounted even tought the IsCardInserted works as expected. :’(
Gus, here’s where a list of short-sharp code “test apps” that perform validation of some core function like SD card would assist - instead of asking whether my code is right or what, you simply load the SD test program that then goes and does its checks - if you fail then the chances are there’s something else wrong other than code.
what modules are connected to the mainboard? Only the DualPower and the SD?
I think that it could be usefull to know your modules configuration.
My SD module works fine in my configuration (DualPower, Display, Ethernet, SD) but perhaps any other modules connected to the fez spider could cause the SD problem.