我有一个应用程序,在Linux和Windows上工作。我需要知道应用程序在哪里使用不同的代码。谢谢
发布于 2016-08-29 21:33:15
您可能正在寻找具有IsOsPlatform函数的System.Runtime.InteropServices.RuntimeInformation来执行运行时检查。
看过ASP.NET怪兽的视频教程https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information。
https://stackoverflow.com/questions/39207282
复制相似问题