HOW TO create endpoint with Hostname or IP address in Silverlight

There are some classes in the Namespace System.Net

With Hostname use the following Class

DnsEndPoint

an example in C#

DnsEndPoint endpoint = new DnsEndPoint("https://www.myerrorsandmysolutions.com", 80);

in VB.NET

Dim endpoint As New DnsEndPoint("https://www.myerrorsandmysolutions.com", 80)

With IP address use the following Class

IPEndPoint

an example in C#

IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 80);

in VB.NET

Dim endpoint As New IPEndPoint(IPAddress.Parse("127.0.0.1"), 80)

Did my HOW TO help you? Leave a reply.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.