c# get motherboard id
public static string GetMotherBoardID()
{
string mbInfo = String.Empty;
ManagementScope scope = new ManagementScope("\\\\" + Environment.MachineName + "\\root\\cimv2");
scope.Connect();
ManagementObject wmiClass = new ManagementObject(scope, new ManagementPath("Win32_BaseBoard.Tag=\"Base Board\""), new ObjectGetOptions());
foreach (PropertyData propData in wmiClass.Properties)
{
if (propData.Name == "SerialNumber")
mbInfo = String.Format("{0,-25}{1}", propData.Name, Convert.ToString(propData.Value));
}
return mbInfo;
}
Also in C#:
- c# implement a superclass in subclass
- unity how to set an objects postion x,y,z
- c# counting lines
- C# foreach loop async but wait at end
- how to make if statement c#
- winforms c# add data to datagridview with a button
- c# string to lowercase
- C# webclient immitate browser
- c# list tuple
- c# string
- c# send email
- first sentence letter capital in c#
- c# fileupload example
- c# convert dictionary to anonymous object
- exception handling c#
- c# size of enum
- c# get enum in list
- How to set an expiry date on a program
- snippet to create constructor in asp.net c#
- s3 upload base64 .net core
- interop C# save as and replace
- check distance to gameobject
- C# .net core convert to int round up
- how to redirect to extern page in .net core