[英]How to get information about runtime .Net Core
我有一個可以在Linux和Windows上運行的應用程序。 我需要知道應用在哪里使用差異代碼。 謝謝
您可能正在尋找帶有IsOsPlatform
函數的System.Runtime.InteropServices.RuntimeInformation
來進行運行時檢查。
看一下視頻教程https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information of ASP.NET Monsters。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.