如何获取有关运行时 .Net Core 的信息 [英] How to get information about runtime .Net Core

查看:32
本文介绍了如何获取有关运行时 .Net Core 的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个适用于 Linux 和 Windows 的应用程序.我需要知道应用程序在哪里工作以使用差异代码.谢谢

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

推荐答案

您可能正在寻找 System.Runtime.InteropServices.RuntimeInformationIsOsPlatform 函数来执行运行时检查.

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

看看视频教程 https://channel9.msdn.com/Series/aspnetmonsters/ASPNET-Monsters-Episode-46-Finding-Platform-Information ASP.NET Monsters.

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

这篇关于如何获取有关运行时 .Net Core 的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆