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 1099599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:45:28+00:00 2026-05-17T00:45:28+00:00

what is best and Quick way to find user connected to internet or not

  • 0

what is best and Quick way to find user connected to internet or not ?

  • 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-17T00:45:29+00:00Added an answer on May 17, 2026 at 12:45 am

    try this:

       1: /// <summary>
       2: /// Performs actions on the network
       3: /// </summary>
       4: public sealed class NetworkHandler
       5: {
       6:     /// <summary>
       7:     /// Private constructor to prevent compiler from generating one
       8:     /// since this class only holds static methods and properties
       9:     /// </summary>
      10:     NetworkHandler() { }
      11:  
      12:     /// <summary>
      13:     /// SafeNativeMethods Class that holds save native methods 
      14:     /// while suppressing unmanaged code security
      15:     /// </summary>
      16:     [SuppressUnmanagedCodeSecurityAttribute]
      17:     internal static class SafeNativeMethods
      18:     {
      19:         // Extern Library
      20:         // UnManaged code - be careful.
      21:         [DllImport("wininet.dll", CharSet = CharSet.Auto)]
      22:         [return: MarshalAs(UnmanagedType.Bool)]
      23:         private extern static bool 
      24:             InternetGetConnectedState(out int Description, int ReservedValue);
      25:  
      26:         /// <summary>
      27:         /// Determines if there is an active connection on this computer
      28:         /// </summary>
      29:         /// <returns></returns>
      30:         public static bool HasActiveConnection()
      31:         {
      32:             int desc;
      33:             return InternetGetConnectedState(out desc, 0);
      34:         }
      35:     }
      36: }
    

    Source: http://blog.dotnetclr.com/archive/2007/09/24/Check-for-internet-connection—Method-2.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: best way to clear contents of .NET’s StringBuilder Is there a quick
I'm trying to find a simple easy quick way to decode and encode a
Bit of an issue as to not knowing which is the best way to
A quick question on best practice for handling images in a PHP/MySQL CMS. Each
Just a quick question about best practice in MVC development. Let's say that I've
Best way to match 2 pages for Google analytics. Pages to Query: 1.) this_google.html
Best method to add/remove webcontrols or user controls in asp.net for dynamic forms without
I need to findout a better and quick way to query MySQL table to
Hey everyone, got a quick question that I can't seem to find anything about...
I'm fairly new to Objectify, and I had a quick question for the best

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.