Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,I need to get the information of my System by writing C# code ,Like when I type ipconfig/all in C:\windows\System\cmd.exe
I need to find my
IP address
MAC Address
Serial Number of my computer.
Posted
Updated 7-Sep-16 21:26pm
v2
Comments
Amul V V Wayangankar 21-Apr-12 3:51am    
Thanks Abhinav.
serial number you are looking for is for Mother board,Hard Disk.

For IP address - http://www.csharp-examples.net/local-ip/[^].

For MAC -
http://www.dotnetboss.com/2010/04/27/how-to-get-mac-address-using-c/[^]
http://www.websofia.com/2011/03/get-local-machines-mac-address-in-c/[^]

I'm not sure what serial number you are looking for i.e. motherboard, harddrive etc.
 
Share this answer
 
Comments
VJ Reddy 23-Apr-12 19:49pm    
Good references. +5
Abhinav S 23-Apr-12 23:15pm    
Thank you VJ.
Here's an updated article explaining how to get the local machine's MAC address in C#:
Get local machine's MAC address in C#[^]
 
Share this answer
 
Comments
Richard MacCutchan 8-Sep-16 6:19am    
And this one four years ago. Please do not search old questions just so you can post something in them.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900