I'm using C# on my project and I want to run only on selected Computers, we've used mac-address to check if computers mac-address are in the list and if not message show like.
how to do this using C#?
if (listofmacaddress == true)
{
//run the program
}
else
{
MessageBox.Show("Invalid mac address, application close. ",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
public static bool listofmacaddress()
{
var mac = // get mac address
if(mac == "##########1")
return true;
else if(mac == "#########2")
return true;
else
return false;
}