.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

Get the processor id using c#

Posted By:Hiren Soni       Posted Date: August 23, 2010    Points: 25    Category:    URL: http://www.dotnetspark.com  

Get the processor id using c#
 

Get the processor id using c#

 

First add the reference  System.Management from COM tab.

Code:

 

using System.Management;

 

            ManagementObjectSearcher mo = new ManagementObjectSearcher("select * from Win32_Processor");

 

            foreach (ManagementObject mob in mo.Get())

            {

                try

                {

                    listBox1.Items.Add(mob["ProcessorId"].ToString());

                   

                }

                catch (Exception ex)

                {

                    // handle exception

                }

            }

 

 



     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend