Click here to Skip to main content
15,911,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to check the connection with what it is connected.
if my connection is wireless then a specific icon will appear and if it is by cable then another icon will apppear like in windows.

What I have tried:

I already did the check with the cable but how to differentiate both.
Thank you.
Posted
Updated 27-Jul-16 5:48am

1 solution

NetworkInterface.GetAllNetworkInterfaces() (using System.Net.NetworkInformation) should do the job:
https://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=DE-DE&k=k(NetworkInterface.GetAllNetworkInterfaces);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true[^]

An example you can find here:
NetworkInterface-Klasse (System.Net.NetworkInformation)[^]
Search in the example for "adapter.NetworkInterfaceType"

I hope it helps.
 
Share this answer
 
v2
Comments
TatsuSheva 28-Jul-16 5:31am    
I got Tunnel, it means that it is by wire ?
If I want to translate the Tunnel into another language how I can do it ?
[no name] 28-Jul-16 5:34am    
Tunneling has nothing to do with the physical Transmission medium... see i.e. Windows TCP Tunnel[^] for tunneling
TatsuSheva 28-Jul-16 5:44am    
So how to check if it is by wire then ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900