Name

IPAddress

Synopsis

This class represents an IP address. Use the Parse() method to turn a dotted-quad string (such as “192.168.0.1”) into an IPAddress. Use the ToString() method to convert an IPAddress into a string.

Public Class IPAddress
                  ' Public Constructors
   Public Sub New( ByVal newAddress As Long) 
' Public Shared Fields
   Public Shared ReadOnly Any As IPAddress                       // =0.0.0.0
   Public Shared ReadOnly Broadcast As IPAddress                 // =255.255.255.255
   Public Shared ReadOnly Loopback As IPAddress                  // =127.0.0.1
   Public Shared ReadOnly None As IPAddress                      // =255.255.255.255
                  ' Public Instance Properties
   Public Property Address As Long  
   Public ReadOnly Property AddressFamily As AddressFamily  
' Public Shared Methods
   Public Shared Function HostToNetworkOrder(
        ByVal host As Short) As Short  
   Public Shared Function HostToNetworkOrder(
        ByVal host As Integer) As Integer  
   Public Shared Function HostToNetworkOrder(
        ByVal host As Long) As Long  
   Public Shared Function IsLoopback(
        ByVal address As IPAddress) As Boolean  
   Public Shared Function NetworkToHostOrder(
        ByVal network As Short) As Short  
   Public Shared Function NetworkToHostOrder(
        ByVal network As Integer) As Integer  
   Public Shared Function NetworkToHostOrder(
        ByVal network As Long) As Long  
   Public Shared Function Parse(
        ByVal ipString As String) As IPAddress  
' Public Instance Methods
   Overrides Public Function Equals(
        ByVal comparand As Object) As Boolean  
   Overrides Public Function GetHashCode() As Integer  
   Overrides Public Function ToString() As String End ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.