There are times when you want to build an app targeting different platforms in Windows using the conditional compilation with pre-processor directives.

Cross-Platform Conditional Compilation Symbol for Windows Phone

If you are targeting the Xbox platform, one may use the pre-processor directive XBOX, similarly if you are targeting the Windows Phone platform , you can use the WINDOWS_PHONE pre-processor directive as shown below.

#if WINDOWS_PHONE

#endif

More details about the Conditional compilation with pre-processor directives in Windows Phone 8 and Windows 8 can be found here

Leave a Reply

Your email address will not be published. Required fields are marked *

Liked this content?. Please spread the word :)

  • RSS
  • Twitter
    Visit Us
    Follow Me