Click here to Skip to main content
   

C#

 
GeneralRe: How to reference .net DLL present in other folder [modified] PinmemberAlan N2-Jan-13 9:51 
GeneralRe: How to reference .net DLL present in other folder PinmemberKASR18-Jan-13 9:00 
QuestionRe: How to reference .net DLL present in other folder PinmemberPIEBALDconsult26-Dec-12 10:13 
AnswerRe: How to reference .net DLL present in other folder PinmemberKASR126-Dec-12 17:25 
QuestionUsage of Google API in windows application Pinmemberukraju24-Dec-12 2:05 
AnswerRe: Usage of Google API in windows application Pinmemberfrazzle-me24-Dec-12 3:25 
AnswerRe: Usage of Google API in windows application PinmemberSajeesh Payolam24-Dec-12 21:28 
QuestionDetecting a 3G connection in Windows 7 and 8 in a desktop application [modified] PinmemberREDSERPENT724-Dec-12 2:04 
Hi
 
I am in the process of developing a cloud backup software. The application is a desktop application developed using C#.
 
I need to add an option to stop/pause the backup if the computer was connected to a 3G network to save cost for the user.
 
I cannot seem to be able to find any example on how this can be achieved, there are some examples for Windows Phone and Windows Store Apps but I cannot find anything that can check if the connection type is a WiFi/Ethernet or 3G the latter is my main concern.
 
I tried a test application to enumerate the networks:
 
Console.WriteLine("checking network interfaces\n");
 
NetworkInterface[] interfaces =  NetworkInterface.GetAllNetworkInterfaces();
 
foreach (var networkInterface in interfaces)
{
   Console.WriteLine("Interface Detected");
   Console.WriteLine("Description: "+networkInterface.Description);
   Console.WriteLine("ID: " + networkInterface.Id);
   Console.WriteLine("Name: " + networkInterface.Name);
   Console.WriteLine("Interface Type: " + networkInterface.NetworkInterfaceType);
   Console.WriteLine("Operational Status: " + networkInterface.OperationalStatus.ToString());
   Console.WriteLine("Speed: " + networkInterface.Speed.ToString());
   Console.WriteLine("Supports Multicast: " + networkInterface.SupportsMulticast.ToString());
   Console.WriteLine("#########################################################\n");
}
The above code list my 3G connection as PPP which can be either ADSL or 3G. I am not sure if I can differentiate using some other options or APIs
 
I need a clear way to distinguish between those networks and so far I cannot find a way of doing so.
 
Can someone please help?

modified 24-Dec-12 7:12am.

AnswerRe: Detecting a 3G connection in Windows 7 and 8 in a desktop application PinmemberMaulikDusara24-Dec-12 21:44 
GeneralRe: Detecting a 3G connection in Windows 7 and 8 in a desktop application PinmemberREDSERPENT729-Dec-12 22:33 
QuestionIpstatus.Success answer twice !! PinmemberAlex1971_rm24-Dec-12 1:15 
QuestionHow do i create an object of partial class in user control Pinmemberswapnil709022-Dec-12 21:27 
AnswerRe: How do i create an object of partial class in user control Pinmembernainakarri22-Dec-12 23:03 
Questionerror i declaring null arrays Pinmembertashee22-Dec-12 6:22 
AnswerRe: error i declaring null arrays PinmvpRichard MacCutchan22-Dec-12 7:40 
GeneralRe: error i declaring null arrays Pinmembertashee22-Dec-12 8:39 
GeneralRe: error i declaring null arrays PinmemberPIEBALDconsult22-Dec-12 9:11 
GeneralRe: error i declaring null arrays Pinmemberharold aptroot24-Dec-12 1:52 
QuestionWorking with data base Pinmembercolumbos1492722-Dec-12 5:26 
AnswerRe: Working with data base PinmemberPIEBALDconsult22-Dec-12 6:07 
GeneralRe: Working with data base PinmemberSledgeHammer0122-Dec-12 10:38 
GeneralRe: Working with data base PinmemberPIEBALDconsult22-Dec-12 13:58 
GeneralRe: Working with data base Pinmemberjschell22-Dec-12 15:05 
GeneralRe: Working with data base PinmemberSimon_Whale23-Dec-12 1:05 
AnswerRe: Working with data base PinmvpAbhinav S25-Dec-12 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150301.1 | Last Updated 1 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid