Skip to content

Class CSharpLib.Computer.NetworkInfo

Samuel edited this page May 16, 2021 · 1 revision

This class gets information about the computer's network interfaces. To use it, first create an instance:

using CSharpLib.Computer;

NetworkInfo info = new NetworkInfo();

Below is a list of the current properties and their functions:

  • IsConnected - Checks whether a network connection exists and returns true or false.
  • GetIPAddresses - Returns a string array of the device's IP addresses.
  • GetNetworkAdapters - Returns a string array of connected network adapters.
  • GetHostName - Returns the device's host name.
  • IPConfig - Returns a Dictionary<string, string> in which the keys are network interface names and their corresponding values are their IP addresses.