簡體   English   中英

如何獲取有關運行時.Net Core的信息

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM