SIGN UP MEMBER LOGIN:    
ARTICLE

Get your System Information using C#

Posted by Ahmed Abdel Ghany Articles | Current Affairs May 05, 2004
In this article I will discuss how you can get information about your system such as available operating system, hardware, and domain.
Reader Level:
Download Files:
 

In this article I will discuss how you can get information about your system such as available operating system, hardware, and domain.

I have used three different ways.

The first way is using the SystemInformation class. Which you can find in the System.Windows.Forms namespace. This class provides information about the operating system. This class has properties. You simply call the property. For example, this code gives the primary monitor size.

SystemInformation.PrimaryMonitorSize.ToString ();

The second way is to use the Environment class, which you can find in the System namespace. This Important class provides information about the current environment and platform. For example, the following code gives you the user domain name, and operating system version.

System.Environment.UserDomainName;
System.Environment.OSVersion.ToString ();

The third way is using the Registry class, which you can find in the Microsoft.Win32 namespace. This very important class helps you to access values and subkeys in Windows registry.

See the attached code for more details.

 

 

Login to add your contents and source code to this article
share this article :
post comment
 

thank you

Posted by hung pham Dec 07, 2011

its nice sir..... thnk u so much....

Posted by Sagarax Tippe Jan 12, 2011

but how to retrieve the windows user group info? and the relationship between user and user group ? use Win32?

Posted by yu hui Dec 14, 2010

    your application is really good

Posted by pooja butale Jul 28, 2010

So cool ,Tnx alot.

Posted by amin ghasemazar Jan 14, 2010
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Nevron Gauge for SharePoint
Become a Sponsor