I found that optional parameters work correctly in Silverlight, but not in XNA. I used #if stuff to get around this in general code as follows:
#if !SILVERLIGHT public SomeClass ( ) : this (null) { } public SomeClass(object someParam) #else public SomeClass(object someParam = null) #endif { m_someParam = someParam; }
But this touch is ugly. I also noticed that the Add Links dialog box from PowerPoint Power Pack does not work with XNA projects, indicating that something suspicious is happening with XNA projects. [As a note, I can deploy and debug Silverlight applications for the emulator through VS, but not XNA applications]
source share