What's the easiest way to verify there's an available network connection?

前端 未结 4 631
小蘑菇
小蘑菇 2021-02-04 14:43

I\'m a bit of newbie to c#/.net development, but I\'ve put together a stock tracking application for a small set of assets in my company. I have also set up the database it conn

4条回答
  •  情歌与酒
    2021-02-04 15:06

    We have an application that runs mainly in police cars connected via wireless air cards. We needed a way to determine if they were connected or not. We wrote a very small Ping.cs class that pings a predetermined IP or computer name at a regular intervals. We interpret the result message and change the display of a system tray connection icon. If you want I can send you the C# code.

提交回复
热议问题