Reputation: 1343
I have an app which works on Linux and Windows. I need to know where the app is working for use difference code. Thanks
Upvotes: 5
Views: 1239
Reputation: 15405
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.
Upvotes: 5