Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why Dns.Resolve Method in C# is obsolete ? Workaround? Pin
ksaw12328-Dec-09 0:33
ksaw12328-Dec-09 0:33 
GeneralRe: Why Dns.Resolve Method in C# is obsolete ? Workaround? Pin
OriginalGriff28-Dec-09 2:23
mveOriginalGriff28-Dec-09 2:23 
QuestionHow to implement multicoulumn combobox in datagridviewcombobox? Pin
arj_agt27-Dec-09 19:02
arj_agt27-Dec-09 19:02 
AnswerRe: How to implement multicoulumn combobox in datagridviewcombobox? Pin
Ben Fair28-Dec-09 2:39
Ben Fair28-Dec-09 2:39 
Questionhow to make web based multipoint sdk application Pin
krunal2527-Dec-09 18:59
krunal2527-Dec-09 18:59 
AnswerRe: how to make web based multipoint sdk application Pin
nagendrathecoder27-Dec-09 19:58
nagendrathecoder27-Dec-09 19:58 
QuestionHow to check Internet Connection on different gateway Pin
Mayur27-Dec-09 18:42
professionalMayur27-Dec-09 18:42 
AnswerRe: How to check Internet Connection on different gateway Pin
Dimitri Witkowski28-Dec-09 4:51
Dimitri Witkowski28-Dec-09 4:51 
One way to do this is connect to any site from the certain interface.
An example:

C#
static void Main(string[] args) {
    Console.WriteLine(IsInternetUp("192.168.1.6"));
    Console.WriteLine(IsInternetUp("127.0.0.1"));
}

private static bool IsInternetUp(string address) {
    IPEndPoint localEp = new IPEndPoint(IPAddress.Parse(address), 0);
    TcpClient client = new TcpClient(localEp);
    try {
        client.Connect("google.com", 80);
    } catch (SocketException) {
        return false;
    } finally {
        client.Close();
    }
    return true;
}


This will give:
True
False

Another way is to make a ping from a certain interface:
<br />
ping -S 192.168.1.6 google.com<br />
ping -S 127.0.0.1 google.com<br />

But I'm not sure whether it's possible to implement this using .NET Framework built-in classes.

Possibly this will help you: [^]
QuestionFractal Index Pin
self similar idiot27-Dec-09 11:32
self similar idiot27-Dec-09 11:32 
QuestionDo you know any ListViewItem samples ? Pin
Mohammad Dayyan27-Dec-09 9:21
Mohammad Dayyan27-Dec-09 9:21 
AnswerRe: Do you know any ListViewItem samples ? Pin
ProtoBytes28-Dec-09 12:20
ProtoBytes28-Dec-09 12:20 
Questionconnecting user controls to each other ( link them to gether) Pin
NoName_ark27-Dec-09 2:42
NoName_ark27-Dec-09 2:42 
AnswerRe: connecting user controls to each other ( link them to gether) Pin
Luc Pattyn27-Dec-09 3:03
sitebuilderLuc Pattyn27-Dec-09 3:03 
GeneralRe: connecting user controls to each other ( link them to gether) Pin
NoName_ark27-Dec-09 3:11
NoName_ark27-Dec-09 3:11 
GeneralRe: connecting user controls to each other ( link them to gether) Pin
Luc Pattyn27-Dec-09 3:14
sitebuilderLuc Pattyn27-Dec-09 3:14 
GeneralRe: connecting user controls to each other ( link them to gether) Pin
NoName_ark27-Dec-09 3:20
NoName_ark27-Dec-09 3:20 
Questionpayload fragmentation [modified] Pin
3bood.ghzawi27-Dec-09 1:07
3bood.ghzawi27-Dec-09 1:07 
AnswerRe: payload fragmentation Pin
Md. Marufuzzaman27-Dec-09 3:25
professionalMd. Marufuzzaman27-Dec-09 3:25 
Questiondatetimepicker format for entire application!! [modified] Pin
Hussam Fattahi26-Dec-09 20:37
Hussam Fattahi26-Dec-09 20:37 
AnswerRe: datetimepicker format for entire application!! Pin
#realJSOP27-Dec-09 1:52
mve#realJSOP27-Dec-09 1:52 
GeneralRe: datetimepicker format for entire application!! Pin
Luc Pattyn27-Dec-09 2:03
sitebuilderLuc Pattyn27-Dec-09 2:03 
GeneralRe: datetimepicker format for entire application!! Pin
Hussam Fattahi27-Dec-09 20:02
Hussam Fattahi27-Dec-09 20:02 
GeneralRe: datetimepicker format for entire application!! Pin
#realJSOP27-Dec-09 23:58
mve#realJSOP27-Dec-09 23:58 
GeneralRe: datetimepicker format for entire application!! Pin
Hussam Fattahi28-Dec-09 2:14
Hussam Fattahi28-Dec-09 2:14 
GeneralRe: datetimepicker format for entire application!! Pin
#realJSOP28-Dec-09 4:38
mve#realJSOP28-Dec-09 4:38 

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

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