hello guys how r u all ?
my question is that, how can we get network interfaces in combo box and their mac addresses on selection changed event ...
Reply soon
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 7, 2012, 10:44 AM
{
textBox.Text = "";
return;
}
Faisal AnsariPosted Jun 7, 2012, 5:59 AM
actually i have done like this,
var nic = NetworkInterfaces.GetAllNetworkInterfaces();
foreach( var ni in nic)
{
comboBox.Items.Add(ni.Name);
}
and now i have to get MAC address which is selected in combo box
like this
private void comboBox_SeletionChanged(object sender, SelectionChangedEventArgs e)
{
now what should i write here ???
}
Nattudurai EswaramurthyPosted Jun 7, 2012, 5:54 AM
Nattudurai EswaramurthyPosted Jun 7, 2012, 5:52 AM
Now, if you want the NetworkInterface object you do something like: