I found a wonderful site that gives various code samples that you can test out and try.
This was one that was interesting to me.
For some reason it does not seem to work.
I tried adding
Console.ReadLine()
Console.Write("Press enter to continue...")
but that only gives me the number 2 and when I press enter I briefly see "Press enter to continue..." then the program closes.
First off I thought that the idea of this code was to check whether the specified host name is a valid DNS name.
It does not seem to do anything of the sort.
This was one that was interesting to me.
Code:
Imports System.IO
Imports System.Net
Imports System.Text
public class MainClass
Shared Sub Main()
Console.WriteLine(Uri.CheckHostName("www.google.com"))
End Sub
End ClassI tried adding
Console.ReadLine()
Console.Write("Press enter to continue...")
but that only gives me the number 2 and when I press enter I briefly see "Press enter to continue..." then the program closes.
First off I thought that the idea of this code was to check whether the specified host name is a valid DNS name.
It does not seem to do anything of the sort.