Jump to content

Network Status via .net


Recommended Posts

Can anybody help me figure out how to run this .net code in LabVIEW

bool networkUp = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

I always seem to fall at the first hurdle with .net, I usually cannot figure out what constructor to use (if any) or in this case even find the method in the GAC or by browsing. As as I understand this method is "global" and does not need any kind of constructor?

Any ideas?

Capture.PNG

Link to comment

OK turns out I was looking in the wrong place!

You have to browse to just System (Not System.Net.Networkinformation) and there it is..

Also the .net API browser courtesy of Microsoft comes in handy https://docs.microsoft.com/en-gb/dotnet/api/system.net.networkinformation.networkinterface.getisnetworkavailable?view=netframework-4.7.1#System_Net_NetworkInformation_NetworkInterface_GetIsNetworkAvailable

 

Capture2.PNG

Edited by Neil Pate
  • Like 2
Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.