C# 운영체제의 버전 알아내기. (Find out the version of the Windows.)
페이지 정보
본문
현재 운영체제의 버전(Windows7, Windows10...) 알아내기.
/// <summary>
/// 컴퓨터가 윈도우 7 운영체제인지 확인합니다.
/// </summary>
/// <returns>운영체제가 Windows 7이면 True를 반환합니다.</returns>
public static bool IsWindows7()
{
var reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
string productName = (string)reg.GetValue("ProductName");
return productName.StartsWith("Windows 7");
}
추천0 비추천0
- 이전글Javascript를 이용해서 버튼 클릭하는 방법. 20.11.19
- 다음글이미지를 바이트 배열로 바꾸는 방법. (How to turn an image into an array of bytes.) 20.11.18