MinPort Field
Collapse the table of content
Expand the table of content

IPEndPoint.MinPort Field

 

Specifies the minimum value that can be assigned to the Port property. This field is read-only.

Namespace:   System.Net
Assembly:  System (in System.dll)

public const int MinPort

Field Value

Type: System.Int32

The following example uses the MinPort property to print the minimum value that can be assigned to the Port property.




IPAddress hostIPAddress1 = (Dns.Resolve(hostString1)).AddressList[0];
Console.WriteLine(hostIPAddress1.ToString());
IPEndPoint hostIPEndPoint = new IPEndPoint(hostIPAddress1,80);
Console.WriteLine("\nIPEndPoint information:" + hostIPEndPoint.ToString());
Console.WriteLine("\n\tMaximum allowed Port Address :" + IPEndPoint.MaxPort);
Console.WriteLine("\n\tMinimum allowed Port Address :" + IPEndPoint.MinPort);
Console.WriteLine("\n\tAddress Family :" + hostIPEndPoint.AddressFamily);

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2016 Microsoft