using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace OSEdition
{
public partial class Form1 : Form
{
public enum OSEdition
{
Bit32,
Bit64
};
public OSEdition GetOSEdition
{
get
{
if (System.IntPtr.Size == 8)
{
return OSEdition.Bit64;
}
else
{
return OSEdition.Bit32;
}
}
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
if (GetOSEdition == OSEdition.Bit64)
{
label1.Text = "Its a 64 bit edition of Windows";
}
else
{
label1.Text = "Its a 32 bit edition of Windows";
}
}
}
}
No comments:
Post a Comment