Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void IPAddresses( String^ server )

//<Snippet3>
// Display the type of address family supported by the server. If the
// server is IPv6-enabled this value is: InternNetworkV6. If the server
// server is IPv6-enabled this value is: InterNetworkV6. If the server
// is also IPv4-enabled there will be an additional value of InterNetwork.
Console::WriteLine( "AddressFamily: {0}", curAdd->AddressFamily );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static void IPAddresses(string server)
//<Snippet3>

// Display the type of address family supported by the server. If the
// server is IPv6-enabled this value is: InternNetworkV6. If the server
// server is IPv6-enabled this value is: InterNetworkV6. If the server
// is also IPv4-enabled there will be an additional value of InterNetwork.
Console.WriteLine("AddressFamily: " + curAdd.AddressFamily.ToString());

Expand Down Expand Up @@ -152,4 +152,4 @@ public static void Main(string[] args)

}
}
// </Snippet1>
// </Snippet1>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
' <Snippet1>
' This program shows how to use the IPAddress class to obtain a server
' IP addressess and related information.
Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Text.RegularExpressions
Expand All @@ -22,7 +21,10 @@ Namespace Mssc.Services.ConnectionManagement
Module M_TestIPAddress

Class TestIPAddress
'The IPAddresses method obtains the selected server IP address information. 'It then displays the type of address family supported by the server and 'its IP address in standard and byte format.

'The IPAddresses method obtains the selected server IP address information.
'It then displays the type of address family supported by the server and
'its IP address in standard and byte format.
Private Shared Sub IPAddresses(ByVal server As String)
Try
Dim ASCII As New System.Text.ASCIIEncoding()
Expand All @@ -36,7 +38,7 @@ Namespace Mssc.Services.ConnectionManagement

'<Snippet3>
' Display the type of address family supported by the server. If the
' server is IPv6-enabled this value is: InternNetworkV6. If the server
' server is IPv6-enabled this value is: InterNetworkV6. If the server
' is also IPv4-enabled there will be an additional value of InterNetwork.
Console.WriteLine(("AddressFamily: " + curAdd.AddressFamily.ToString()))

Expand Down Expand Up @@ -105,9 +107,6 @@ Namespace Mssc.Services.ConnectionManagement
' Define a regular expression to parse user's input.
' This is a security check. It allows only
' alphanumeric input string between 2 to 40 character long.
'Define a regular expression to parse user's input.
'This is a security check. It allows only
'alphanumeric input string between 2 to 40 character long.
Dim rex As New Regex("^[a-zA-Z]\w{1,39}$")

If args.Length < 1 Then
Expand All @@ -132,4 +131,4 @@ Namespace Mssc.Services.ConnectionManagement
End Class 'TestIPAddress
End Module
End Namespace
' </Snippet1>
' </Snippet1>