如何在WinRT应用程序(Javascript、C#)中区分Windows Phone 8.1和Windows 8.1
本文关键字:Windows 中区 Phone WinRT 应用程序 Javascript | 更新日期: 2023-09-27 18:28:46
如何在使用Javascript或C#的WinRT应用程序中区分Windows Phone 8.1和Windows 8.1?我需要在运行时了解操作系统。有人能帮忙吗?
如果在代码中,请尝试使用pragma预处理器。例如
#if WINDOWS_PHONE
windows phone code here
#else if WINDOWS
windows 8 code here
#endif