Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# network traffic

using System;
using System.Net.NetworkInformation;

class MainClass
{
    static void Main()
    {
        if (!NetworkInterface.GetIsNetworkAvailable())
           return;

        NetworkInterface[] interfaces 
            = NetworkInterface.GetAllNetworkInterfaces();

        foreach (NetworkInterface ni in interfaces)
        {                
            Console.WriteLine("    Bytes Sent: {0}", 
                ni.GetIPv4Statistics().BytesSent);
            Console.WriteLine("    Bytes Received: {0}",
                ni.GetIPv4Statistics().BytesReceived);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# struct 
Csharp :: wpf get function name 
Csharp :: unity c# change animation 
Csharp :: text read C# 
Csharp :: verify if number c# 
Csharp :: print all complete object in list c# 
Csharp :: c# switch statements 
Csharp :: c# close form 
Csharp :: c# string to int 
Csharp :: unity toint 
Csharp :: C# select keyword lambda 
Csharp :: c# read large file 
Csharp :: c# create excel file 
Csharp :: how to make pc bsod C# 
Csharp :: c# string console readline array 
Csharp :: draw on picturebox c# 
Csharp :: dapper sql builder where 
Csharp :: c# xml get child node by name 
Csharp :: C# actions 
Csharp :: take space separated input in c# 
Csharp :: prevent system shutdown c# 
Csharp :: append an array in c# 
Csharp :: recursively reverse linked list 
Csharp :: create new object c# 
Csharp :: interface property implementation c# 
Csharp :: frustum 
Csharp :: c# for 
Csharp :: unity audio source 
Csharp :: how to get the today date in c# 
Csharp :: aspx element visibility ould not find 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =