NetworkInterface::Speed Property
.NET Framework (current version)
Gets the speed of the network interface.
Assembly: System (in System.dll)
The value returned by this property is reported by the network interface. It is not computed dynamically.
The following code example demonstrates displaying the speed of interfaces on the local computer.
void ShowInterfaceSpeedAndQueue() { array<NetworkInterface^>^adapters = NetworkInterface::GetAllNetworkInterfaces(); System::Collections::IEnumerator^ myEnum9 = adapters->GetEnumerator(); while ( myEnum9->MoveNext() ) { NetworkInterface ^ adapter = safe_cast<NetworkInterface ^>(myEnum9->Current); IPInterfaceProperties ^ properties = adapter->GetIPProperties(); IPv4InterfaceStatistics ^ stats = adapter->GetIPv4Statistics(); Console::WriteLine( adapter->Description ); Console::WriteLine( " Speed .................................: {0}", adapter->Speed ); Console::WriteLine( " Output queue length....................: {0}", stats->OutputQueueLength ); } }
.NET Framework
Available since 2.0
Available since 2.0
Show: