This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
testexetrisathlon/testexetrisathlon/OSCheck.cs

24 lines
634 B
C#

using System;
using System.Linq;
namespace testexetrisathlon
{
internal static class OSCheck
{
private static bool _checkedWindows;
private static bool _isWindows;
public static bool IsWindows
{
get
{
if (_checkedWindows) return _isWindows;
_isWindows =
new[] {PlatformID.Win32S, PlatformID.Win32Windows, PlatformID.Win32NT, PlatformID.WinCE}
.Contains(Environment.OSVersion.Platform);
_checkedWindows = true;
return _isWindows;
}
}
}
}