Network Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides a property, event, and methods for interacting with the network to which the computer is connected.

Namespace:   Microsoft.VisualBasic.Devices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

System.Object
  Microsoft.VisualBasic.Devices.Network

[HostProtectionAttribute(SecurityAction.LinkDemand, Resources = HostProtectionResource.ExternalProcessMgmt)]
public class Network

NameDescription
System_CAPS_pubmethodNetwork()

Initializes a new instance of the Network class.

NameDescription
System_CAPS_pubpropertyIsAvailable

Indicates whether a computer is connected to a network.

NameDescription
System_CAPS_pubmethodDownloadFile(String, String)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(String, String, String, String)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(String, String, String, String, Boolean, Int32, Boolean)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(String, String, String, String, Boolean, Int32, Boolean, UICancelOption)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String, ICredentials, Boolean, Int32, Boolean)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String, ICredentials, Boolean, Int32, Boolean, UICancelOption)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String, String, String)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String, String, String, Boolean, Int32, Boolean)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodDownloadFile(Uri, String, String, String, Boolean, Int32, Boolean, UICancelOption)

Downloads the specified remote file and saves it in the specified location.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodPing(String)

Pings the specified server.

System_CAPS_pubmethodPing(String, Int32)

Pings the specified server.

System_CAPS_pubmethodPing(Uri)

Pings the specified server.

System_CAPS_pubmethodPing(Uri, Int32)

Pings the specified server.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodUploadFile(String, String)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, String, String, String)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, String, String, String, Boolean, Int32)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, String, String, String, Boolean, Int32, UICancelOption)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri, ICredentials, Boolean, Int32)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri, ICredentials, Boolean, Int32, UICancelOption)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri, String, String)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri, String, String, Boolean, Int32)

Sends the specified file to the specified host address.

System_CAPS_pubmethodUploadFile(String, Uri, String, String, Boolean, Int32, UICancelOption)

Sends the specified file to the specified host address.

NameDescription
System_CAPS_pubeventNetworkAvailabilityChanged

Occurs when the network availability changes.

The following table lists examples of tasks involving the My.Computer.Network object.

To

See

Upload a file

How to: Upload a File in Visual Basic

Download a file

How to: Download a File in Visual Basic

Check connection status

How to: Check Connection Status in Visual Basic

This example uploads the file Order.txt to http://www.cohowinery.com/uploads.

My.Computer.Network.UploadFile ( 
"C:\My Documents\Order.txt", 
"http://www.cohowinery.com/uploads.aspx")

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: