I’m somewhat new to .Net, so go easy on me ;-). Anyway.
I working on my first WP7 library project which I hope will be compatible with both XNA and SilverLight applications. Based on whether I’m in XNA or Silverlight one of my factory classes needs to load different config class. Whats the best way to determine this at runtime, from a library.
I know I could do this with the “SILVERLIGHT+WINDOWS_PHONE” preprocessor directives at compile time. But that would mean building two DLLs, which isn’t ideal.
~Sniff
I suspect that the information you’re looking for can be found in the
Environment.Versionproperty or in theOperatingSystem.Versionproperty.