Cross-Platform Conditional Compilation Symbol for Windows Phone

Published on November 4, 2013 by abundantcode

Filed under Windows Phone

Last modified November 4, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3413 times

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

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...