We need more info to help you.
But if it is basic information you seek.
System.Net.NetworkInformation Namespace[
^] is a good place to start and under
IPv4InterfaceStatistics [
^] you can find info like BytesSent and BytesReceived.
Example:
if (NetworkInterface.GetIsNetworkAvailable())
{
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface iface in interfaces)
{
if (iface.OperationalStatus == OperationalStatus.Up && iface.NetworkInterfaceType != NetworkInterfaceType.Loopback)
{
IPv4InterfaceStatistics stats = iface.GetIPv4Statistics();
long bytesReceived = stats.BytesReceived;
long bytesSent = stats.BytesSent;
Console.WriteLine("Network: " + iface.Description + " (" + iface.Name + "), has sent: " + bytesSent + " bytes and received: " + bytesReceived + " bytes");
}
}
}