dontnet core 3.1 get operating system code example
Example: .net core check if linux
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Console.WriteLine("We're on macOS!");
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Console.WriteLine("We're on macOS!");
}