OperatingSystem 를 사용해서 윈도우 버전을 구할수 있습니다.
전체 소스 :
아래는 주요 소스 입니다.
=================================================================
namespace WATWindowsVersion
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender, EventArgs e)
{
OperatingSystem os = Environment.OSVersion;
Version v = os.Version;
if (5 == v.Major && v.Minor>0)
{
txtResult.Text += "Windows XP" + "\r\n";
}
else
{
txtResult.Text += "그 외 OS" + "\r\n";
}
txtResult.Text += os.ServicePack + "\r\n";
txtResult.Text += "Build : "+v.Build + "\r\n";
txtResult.Text += "Revision : " + v.Revision + "\r\n";
}
}
}
- [2018/02/26] List 에서 고유값 얻기 (4027)
- [2015/05/22] C#, 아두이노 간의 WIFI 통신으로 LCD 제어 (4566)
- [2015/03/13] 항상 마지막에 추가한 TEXT 보이게 (15782)
- [2014/01/17] ComboBox Text 편집 안되게 (14491)
- [2014/01/08] if 문에서 여러개 비교할때 (25340) *3
- [2013/12/30] C++, C# 간단한 기능 비교 (12884)
- [2013/12/18] 3자리마다 ,(콤마) 찍기 (원화, 달러 표시) (15224)
- [2013/09/29] 설치된 IE 버전 얻기 (12398)
- [2013/08/29] byte array to Hexa String (13026)
- [2013/06/25] string array to string (스트링 문자열 합치기) (23713)