How to get information about runtime .Net Core

北战南征 提交于 2019-12-22 07:01:57

问题


I have an app which works on Linux and Windows. I need to know where the app is working for use difference code. Thanks


回答1:


You are probably looking for System.Runtime.InteropServices.RuntimeInformation with the IsOsPlatform function to do runtime checks.

Have look at the video tutorial https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information of the ASP.NET Monsters.



来源:https://stackoverflow.com/questions/39207282/how-to-get-information-about-runtime-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!