Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 582159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:39:26+00:00 2026-05-13T14:39:26+00:00

For my application, I want to show the user about the network bandwidth. So,

  • 0

For my application, I want to show the user about the network bandwidth. So, that getting delay for downloading will be known by the user.. Is it possible to show them??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:39:26+00:00Added an answer on May 13, 2026 at 2:39 pm

    Try this one:
    How to calculate network bandwidth speed in c#.

    enter image description here

    using System;
    using System.Net.NetworkInformation;
    using System.Windows.Forms;
    
    namespace InterfaceTrafficWatch
    {
        /// <summary>
        /// Network Interface Traffic Watch
        /// by Mohamed Mansour
        /// 
        /// Free to use under GPL open source license!
        /// </summary>
        public partial class MainForm : Form
        {
            /// <summary>
            /// Timer Update (every 1 sec)
            /// </summary>
            private const double timerUpdate = 1000;
    
            /// <summary>
            /// Interface Storage
            /// </summary>
            private NetworkInterface[] nicArr;
    
            /// <summary>
            /// Main Timer Object 
            /// (we could use something more efficient such 
            /// as interop calls to HighPerformanceTimers)
            /// </summary>
            private Timer timer;
    
            /// <summary>
            /// Constructor
            /// </summary>
            public MainForm()
            {
                InitializeComponent();
                InitializeNetworkInterface();
                InitializeTimer();
            }
    
            /// <summary>
            /// Initialize all network interfaces on this computer
            /// </summary>
            private void InitializeNetworkInterface()
            {
                // Grab all local interfaces to this computer
                nicArr = NetworkInterface.GetAllNetworkInterfaces();
    
                // Add each interface name to the combo box
                for (int i = 0; i < nicArr.Length; i++)
                    cmbInterface.Items.Add(nicArr[i].Name);
    
                // Change the initial selection to the first interface
                cmbInterface.SelectedIndex = 0;
            }
    
            /// <summary>
            /// Initialize the Timer
            /// </summary>
            private void InitializeTimer()
            {
                timer = new Timer();
                timer.Interval = (int)timerUpdate;
                timer.Tick += new EventHandler(timer_Tick);
                timer.Start();
            }
    
            /// <summary>
            /// Update GUI components for the network interfaces
            /// </summary>
            private void UpdateNetworkInterface()
            {
                // Grab NetworkInterface object that describes the current interface
                NetworkInterface nic = nicArr[cmbInterface.SelectedIndex];
    
                // Grab the stats for that interface
                IPv4InterfaceStatistics interfaceStats = nic.GetIPv4Statistics();
    
                // Calculate the speed of bytes going in and out
                // NOTE: we could use something faster and more reliable than Windows Forms Tiemr
                //       such as HighPerformanceTimer http://www.m0interactive.com/archives/2006/12/21/high_resolution_timer_in_net_2_0.html
                int bytesSentSpeed = (int)(interfaceStats.BytesSent - double.Parse(lblBytesSent.Text)) / 1024;
                int bytesReceivedSpeed = (int)(interfaceStats.BytesReceived - double.Parse(lblBytesReceived.Text)) / 1024;
    
                // Update the labels
                lblSpeed.Text = nic.Speed.ToString();
                lblInterfaceType.Text = nic.NetworkInterfaceType.ToString();
                lblSpeed.Text = nic.Speed.ToString();
                lblBytesReceived.Text = interfaceStats.BytesReceived.ToString();
                lblBytesSent.Text = interfaceStats.BytesSent.ToString();
                lblUpload.Text = bytesSentSpeed.ToString() + " KB/s";
                lblDownload.Text = bytesReceivedSpeed.ToString() + " KB/s";
    
            }
    
            /// <summary>
            /// The Timer event for each Tick (second) to update the UI
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            void timer_Tick(object sender, EventArgs e)
            {
                UpdateNetworkInterface();
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created an application which show data from user current location. I want
Possible Duplicate: Restore a minimized window of another application I want to restore (show
I've an application in which i want to show a list view that is
i have a web application for video uploading,In that i want to show the
We want to show some JSON to a user who is testing our application.
I'm trying to show information about user in my Zend Framework application. I'm using
In my application, I sometimes show a message to the user and I want
I'm working on application where I want show popover in - (void)applicationWillEnterForeground:(UIApplication *)application app
I want to show a list of properties in my application. A property is
In my application, i want to show the status of ( whether the connection

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.