How to Detect the Current device in Universal App ?

To detect the current device platform in the Windows Universal App , the developers can use the predefined ifdirectives WINDOWS_PHONE_APP and WINDOWS_APP .

How to Detect the Current device in Universal App ?

Eg :

#if WINDOWS_PHONE_APP
    // wp8.1
#elseif WINDOWS_APP
    // windows 8.1
#endif