469,645 Members | 1,729 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

C# 2.0 Enable/Disable Local Network Connection

Hello. I need to disable and then enable Local Network Connection
Here is my code:

IPGlobalProperties computerProperties =
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in nics)
if (adapter.NetworkInterfaceType !=
NetworkInterfaceType.Ethernet) return;
if ( adapter.OperationalStatus ==
/// code to disable connection
/// code to enable connection

Can anybody help me?

Boris Moiseev

Sep 19 '06 #1
0 6348

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Derek White | last post: by
2 posts views Thread by Vincent Bouret | last post: by
8 posts views Thread by rongchaua | last post: by
10 posts views Thread by Gary Jefferson | last post: by
6 posts views Thread by =?Utf-8?B?QnNtZW5nZW4=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.