Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
918 lines (861 sloc) 50.4 KB
<Type Name="IPEndPoint" FullName="System.Net.IPEndPoint">
<TypeSignature Language="C#" Value="public class IPEndPoint : System.Net.EndPoint" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit IPEndPoint extends System.Net.EndPoint" />
<TypeSignature Language="DocId" Value="T:System.Net.IPEndPoint" />
<TypeSignature Language="VB.NET" Value="Public Class IPEndPoint&#xA;Inherits EndPoint" />
<TypeSignature Language="C++ CLI" Value="public ref class IPEndPoint : System::Net::EndPoint" />
<TypeSignature Language="F#" Value="type IPEndPoint = class&#xA; inherit EndPoint" />
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Net.EndPoint</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a network endpoint as an IP address and a port number.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IPEndPoint> class contains the host and local or remote port information needed by an application to connect to a service on a host. By combining the host's IP address and port number of a service, the <xref:System.Net.IPEndPoint> class forms a connection point to a service.
## Examples
[!code-cpp[System.Net.IPEndPoint#1](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#1)]
[!code-csharp[System.Net.IPEndPoint#1](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#1)]
[!code-vb[System.Net.IPEndPoint#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#1)]
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.IPEndPoint" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public IPEndPoint (long address, int port);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int64 address, int32 port) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.#ctor(System.Int64,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (address As Long, port As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; IPEndPoint(long address, int port);" />
<MemberSignature Language="F#" Value="new System.Net.IPEndPoint : int64 * int -&gt; System.Net.IPEndPoint" Usage="new System.Net.IPEndPoint (address, port)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="address" Type="System.Int64" />
<Parameter Name="port" Type="System.Int32" />
</Parameters>
<Docs>
<param name="address">The IP address of the Internet host.</param>
<param name="port">The port number associated with the <paramref name="address" />, or 0 to specify any available port. <paramref name="port" /> is in host order.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.IPEndPoint" /> class with the specified address and port number.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the specified IP address and port number to create an <xref:System.Net.IPEndPoint>.
[!code-cpp[IPEndPoint_Properties#4](~/samples/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp#4)]
[!code-csharp[IPEndPoint_Properties#4](~/samples/snippets/csharp/VS_Snippets_Remoting/IPEndPoint_Properties/CS/ipendpoint_properties.cs#4)]
[!code-vb[IPEndPoint_Properties#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="port" /> is less than <see cref="F:System.Net.IPEndPoint.MinPort" />.
-or-
<paramref name="port" /> is greater than <see cref="F:System.Net.IPEndPoint.MaxPort" />.
-or-
<paramref name="address" /> is less than 0 or greater than 0x00000000FFFFFFFF.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public IPEndPoint (System.Net.IPAddress address, int port);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Net.IPAddress address, int32 port) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.#ctor(System.Net.IPAddress,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (address As IPAddress, port As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; IPEndPoint(System::Net::IPAddress ^ address, int port);" />
<MemberSignature Language="F#" Value="new System.Net.IPEndPoint : System.Net.IPAddress * int -&gt; System.Net.IPEndPoint" Usage="new System.Net.IPEndPoint (address, port)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="address" Type="System.Net.IPAddress" />
<Parameter Name="port" Type="System.Int32" />
</Parameters>
<Docs>
<param name="address">An <see cref="T:System.Net.IPAddress" />.</param>
<param name="port">The port number associated with the <paramref name="address" />, or 0 to specify any available port. <paramref name="port" /> is in host order.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.IPEndPoint" /> class with the specified address and port number.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
[!code-cpp[System.Net.IPEndPoint#2](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#2)]
[!code-csharp[System.Net.IPEndPoint#2](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#2)]
[!code-vb[System.Net.IPEndPoint#2](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="address" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="port" /> is less than <see cref="F:System.Net.IPEndPoint.MinPort" />.
-or-
<paramref name="port" /> is greater than <see cref="F:System.Net.IPEndPoint.MaxPort" />.
-or-
<paramref name="address" /> is less than 0 or greater than 0x00000000FFFFFFFF.</exception>
</Docs>
</Member>
<Member MemberName="Address">
<MemberSignature Language="C#" Value="public System.Net.IPAddress Address { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Net.IPAddress Address" />
<MemberSignature Language="DocId" Value="P:System.Net.IPEndPoint.Address" />
<MemberSignature Language="VB.NET" Value="Public Property Address As IPAddress" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Net::IPAddress ^ Address { System::Net::IPAddress ^ get(); void set(System::Net::IPAddress ^ value); };" />
<MemberSignature Language="F#" Value="member this.Address : System.Net.IPAddress with get, set" Usage="System.Net.IPEndPoint.Address" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Net.IPAddress</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the IP address of the endpoint.</summary>
<value>An <see cref="T:System.Net.IPAddress" /> instance containing the IP address of the endpoint.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example sets the <xref:System.Net.IPEndPoint.Address%2A> property using the <xref:System.Net.IPAddress> specified.
[!code-cpp[System.Net.IPEndPoint#3](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#3)]
[!code-csharp[System.Net.IPEndPoint#3](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#3)]
[!code-vb[System.Net.IPEndPoint#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddressFamily">
<MemberSignature Language="C#" Value="public override System.Net.Sockets.AddressFamily AddressFamily { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Net.Sockets.AddressFamily AddressFamily" />
<MemberSignature Language="DocId" Value="P:System.Net.IPEndPoint.AddressFamily" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property AddressFamily As AddressFamily" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Net::Sockets::AddressFamily AddressFamily { System::Net::Sockets::AddressFamily get(); };" />
<MemberSignature Language="F#" Value="member this.AddressFamily : System.Net.Sockets.AddressFamily" Usage="System.Net.IPEndPoint.AddressFamily" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.Sockets.AddressFamily</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the Internet Protocol (IP) address family.</summary>
<value>Returns <see cref="F:System.Net.Sockets.AddressFamily.InterNetwork" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Net.IPEndPoint.AddressFamily%2A> property to return the <xref:System.Net.Sockets.AddressFamily> to which the <xref:System.Net.IPEndPoint> belongs. In this case it is the <xref:System.Net.Sockets.AddressFamily.InterNetwork><xref:System.Net.Sockets.AddressFamily>.
[!code-cpp[System.Net.IPEndPoint#3](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#3)]
[!code-csharp[System.Net.IPEndPoint#3](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#3)]
[!code-vb[System.Net.IPEndPoint#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Net.EndPoint" />
</Docs>
</Member>
<Member MemberName="Create">
<MemberSignature Language="C#" Value="public override System.Net.EndPoint Create (System.Net.SocketAddress socketAddress);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Net.EndPoint Create(class System.Net.SocketAddress socketAddress) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.Create(System.Net.SocketAddress)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::Net::EndPoint ^ Create(System::Net::SocketAddress ^ socketAddress);" />
<MemberSignature Language="F#" Value="override this.Create : System.Net.SocketAddress -&gt; System.Net.EndPoint" Usage="iPEndPoint.Create socketAddress" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.EndPoint</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="socketAddress" Type="System.Net.SocketAddress" />
</Parameters>
<Docs>
<param name="socketAddress">The <see cref="T:System.Net.SocketAddress" /> to use for the endpoint.</param>
<summary>Creates an endpoint from a socket address.</summary>
<returns>An <see cref="T:System.Net.EndPoint" /> instance using the specified socket address.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the specified <xref:System.Net.SocketAddress> to create an <xref:System.Net.IPEndPoint>.
[!code-cpp[System.Net.IPEndPoint#5](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#5)]
[!code-csharp[System.Net.IPEndPoint#5](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#5)]
[!code-vb[System.Net.IPEndPoint#5](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#5)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The AddressFamily of <paramref name="socketAddress" /> is not equal to the AddressFamily of the current instance.
-or-
<paramref name="socketAddress" />.Size &lt; 8.</exception>
<altmember cref="T:System.Net.EndPoint" />
<altmember cref="T:System.Net.SocketAddress" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object comparand);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object comparand) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (comparand As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ comparand);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="iPEndPoint.Equals comparand" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="comparand" Type="System.Object" />
</Parameters>
<Docs>
<param name="comparand">The <see cref="T:System.Object" /> to compare with the current <see cref="T:System.Object" />.</param>
<summary>Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" />.</summary>
<returns>
<see langword="true" /> if the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" />; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Object.Equals(System.Object)" />
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="iPEndPoint.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a hash value for a <see cref="T:System.Net.IPEndPoint" /> instance.</summary>
<returns>An integer hash value.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IPEndPoint.GetHashCode%2A> method returns a hash code of the IP endpoint instance. This value can be used as a key in hash tables.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxPort">
<MemberSignature Language="C#" Value="public const int MaxPort = 65535;" />
<MemberSignature Language="ILAsm" Value=".field public static literal int32 MaxPort = (65535)" />
<MemberSignature Language="DocId" Value="F:System.Net.IPEndPoint.MaxPort" />
<MemberSignature Language="VB.NET" Value="Public Const MaxPort As Integer = 65535" />
<MemberSignature Language="C++ CLI" Value="public: int MaxPort = 65535;" />
<MemberSignature Language="F#" Value="val mutable MaxPort : int" Usage="System.Net.IPEndPoint.MaxPort" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<MemberValue>65535</MemberValue>
<Docs>
<summary>Specifies the maximum value that can be assigned to the <see cref="P:System.Net.IPEndPoint.Port" /> property. The MaxPort value is set to 0x0000FFFF. This field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Net.IPEndPoint.MaxPort> property to print the maximum value that can be assigned to the <xref:System.Net.IPEndPoint.Port%2A> property.
[!code-cpp[IPEndPoint_Properties#4](~/samples/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp#4)]
[!code-csharp[IPEndPoint_Properties#4](~/samples/snippets/csharp/VS_Snippets_Remoting/IPEndPoint_Properties/CS/ipendpoint_properties.cs#4)]
[!code-vb[IPEndPoint_Properties#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MinPort">
<MemberSignature Language="C#" Value="public const int MinPort = 0;" />
<MemberSignature Language="ILAsm" Value=".field public static literal int32 MinPort = (0)" />
<MemberSignature Language="DocId" Value="F:System.Net.IPEndPoint.MinPort" />
<MemberSignature Language="VB.NET" Value="Public Const MinPort As Integer = 0" />
<MemberSignature Language="C++ CLI" Value="public: int MinPort = 0;" />
<MemberSignature Language="F#" Value="val mutable MinPort : int" Usage="System.Net.IPEndPoint.MinPort" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<MemberValue>0</MemberValue>
<Docs>
<summary>Specifies the minimum value that can be assigned to the <see cref="P:System.Net.IPEndPoint.Port" /> property. This field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Net.IPEndPoint.MinPort> property to print the minimum value that can be assigned to the <xref:System.Net.IPEndPoint.Port%2A> property.
[!code-cpp[IPEndPoint_Properties#4](~/samples/snippets/cpp/VS_Snippets_Remoting/IPEndPoint_Properties/CPP/ipendpoint_properties.cpp#4)]
[!code-csharp[IPEndPoint_Properties#4](~/samples/snippets/csharp/VS_Snippets_Remoting/IPEndPoint_Properties/CS/ipendpoint_properties.cs#4)]
[!code-vb[IPEndPoint_Properties#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/IPEndPoint_Properties/VB/ipendpoint_properties.vb#4)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Parse">
<Docs>
<summary>To be added.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The number of parts (each part is separated by a period) in `s` determines how the endpoint's IP address is constructed. A one-part address is stored directly in the network address. A two-part address, convenient for specifying a class A address, puts the leading part in the first byte and the trailing part in the right-most three bytes of the network address. A three-part address, convenient for specifying a class B address, puts the first part in the first byte, the second part in the second byte, and the final part in the right-most two bytes of the network address. For example:
|Number of parts and example `s`|IPv4 address for IPEndPoint.Address|Port|
|-------------------------|--------------------------------|-------------------------|
|1 -- "1"|0.0.0.1|0|
|2 -- "20.2:80"|20.0.0.2|80|
|2 -- "20.65535:23"|20.0.255.255|23|
|3 -- "128.1.2:443"|128.1.0.2|443|
> [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an <xref:System.Int64>, and then treats that <xref:System.Int64> as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.
Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public static System.Net.IPEndPoint Parse (ReadOnlySpan&lt;char&gt; s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Net.IPEndPoint Parse(valuetype System.ReadOnlySpan`1&lt;char&gt; s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.Parse(System.ReadOnlySpan{System.Char})" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Parse (s As ReadOnlySpan(Of Char)) As IPEndPoint" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Net::IPEndPoint ^ Parse(ReadOnlySpan&lt;char&gt; s);" />
<MemberSignature Language="F#" Value="static member Parse : ReadOnlySpan&lt;char&gt; -&gt; System.Net.IPEndPoint" Usage="System.Net.IPEndPoint.Parse s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.IPEndPoint</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="s">A read-only span that contains an IP endpoint in dotted-quad notation or network byte order for IPv4 and in colon-hexadecimal notation for IPv6.</param>
<summary>Converts an IP network endpoint (address and port) represented as a read-only span to an <see cref="T:System.Net.IPEndPoint" /> instance.</summary>
<returns>The object representation of an IP network endpoint.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is <see langword="null" />.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not a valid IP endpoint.</exception>
</Docs>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public static System.Net.IPEndPoint Parse (string s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Net.IPEndPoint Parse(string s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.Parse(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Parse (s As String) As IPEndPoint" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Net::IPEndPoint ^ Parse(System::String ^ s);" />
<MemberSignature Language="F#" Value="static member Parse : string -&gt; System.Net.IPEndPoint" Usage="System.Net.IPEndPoint.Parse s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.IPEndPoint</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="s">A string that contains an IP endpoint in dotted-quad notation or network byte order for IPv4 and in colon-hexadecimal notation for IPv6.</param>
<summary>Converts an IP network endpoint (address and port) represented as a string to an <see cref="T:System.Net.IPEndPoint" /> instance.</summary>
<returns>The object representation of an IP network endpoint.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is <see langword="null" />.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> is not a valid IP endpoint.</exception>
</Docs>
</Member>
<Member MemberName="Port">
<MemberSignature Language="C#" Value="public int Port { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Port" />
<MemberSignature Language="DocId" Value="P:System.Net.IPEndPoint.Port" />
<MemberSignature Language="VB.NET" Value="Public Property Port As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Port { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.Port : int with get, set" Usage="System.Net.IPEndPoint.Port" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the port number of the endpoint.</summary>
<value>An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort" /> to <see cref="F:System.Net.IPEndPoint.MaxPort" /> indicating the port number of the endpoint.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Net.IPEndPoint.Port%2A> property to set TCP port number of the <xref:System.Net.EndPoint>.
[!code-cpp[System.Net.IPEndPoint#3](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#3)]
[!code-csharp[System.Net.IPEndPoint#3](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#3)]
[!code-vb[System.Net.IPEndPoint#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value that was specified for a set operation is less than <see cref="F:System.Net.IPEndPoint.MinPort" /> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort" />.</exception>
</Docs>
</Member>
<Member MemberName="Serialize">
<MemberSignature Language="C#" Value="public override System.Net.SocketAddress Serialize ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Net.SocketAddress Serialize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.Serialize" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Serialize () As SocketAddress" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::Net::SocketAddress ^ Serialize();" />
<MemberSignature Language="F#" Value="override this.Serialize : unit -&gt; System.Net.SocketAddress" Usage="iPEndPoint.Serialize " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.SocketAddress</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Serializes endpoint information into a <see cref="T:System.Net.SocketAddress" /> instance.</summary>
<returns>A <see cref="T:System.Net.SocketAddress" /> instance containing the socket address for the endpoint.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.Net.IPEndPoint.Serialize%2A> method to serialize endpoint information into a <xref:System.Net.SocketAddress> instance.
[!code-cpp[System.Net.IPEndPoint#4](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#4)]
[!code-csharp[System.Net.IPEndPoint#4](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#4)]
[!code-vb[System.Net.IPEndPoint#4](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#4)]
]]></format>
</remarks>
<altmember cref="T:System.Net.EndPoint" />
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="iPEndPoint.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the IP address and port number of the specified endpoint.</summary>
<returns>A string containing the IP address and the port number of the specified endpoint (for example, 192.168.1.2:80).</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example returns a string representation of the IP address and port number of the specified <xref:System.Net.IPEndPoint>.
[!code-cpp[System.Net.IPEndPoint#3](~/samples/snippets/cpp/VS_Snippets_Remoting/System.Net.IPEndPoint/CPP/ipendpoint.cpp#3)]
[!code-csharp[System.Net.IPEndPoint#3](~/samples/snippets/csharp/VS_Snippets_Remoting/System.Net.IPEndPoint/CS/ipendpoint.cs#3)]
[!code-vb[System.Net.IPEndPoint#3](~/samples/snippets/visualbasic/VS_Snippets_Remoting/System.Net.IPEndPoint/VB/ipendpoint.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="TryParse">
<Docs>
<summary>To be added.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The number of parts (each part is separated by a period) in `s` determines how the endpoint's IP address is constructed. A one-part address is stored directly in the network address. A two-part address, convenient for specifying a class A address, puts the leading part in the first byte and the trailing part in the right-most three bytes of the network address. A three-part address, convenient for specifying a class B address, puts the first part in the first byte, the second part in the second byte, and the final part in the right-most two bytes of the network address. For example:
|Number of parts and example `s`|IPv4 address for IPEndPoint.Address|Port|
|-------------------------|--------------------------------|-------------------------|
|1 -- "1"|0.0.0.1|0|
|2 -- "20.2:80"|20.0.0.2|80|
|2 -- "20.65535:23"|20.0.255.255|23|
|3 -- "128.1.2:443"|128.1.0.2|443|
> [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an <xref:System.Int64>, and then treats that <xref:System.Int64> as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.
Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="TryParse">
<MemberSignature Language="C#" Value="public static bool TryParse (ReadOnlySpan&lt;char&gt; s, out System.Net.IPEndPoint result);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryParse(valuetype System.ReadOnlySpan`1&lt;char&gt; s, [out] class System.Net.IPEndPoint&amp; result) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.TryParse(System.ReadOnlySpan{System.Char},System.Net.IPEndPoint@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function TryParse (s As ReadOnlySpan(Of Char), ByRef result As IPEndPoint) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool TryParse(ReadOnlySpan&lt;char&gt; s, [Runtime::InteropServices::Out] System::Net::IPEndPoint ^ % result);" />
<MemberSignature Language="F#" Value="static member TryParse : ReadOnlySpan&lt;char&gt; * IPEndPoint -&gt; bool" Usage="System.Net.IPEndPoint.TryParse (s, result)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
<Parameter Name="result" Type="System.Net.IPEndPoint" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="s">The IP endpoint to validate.</param>
<param name="result">When this method returns, the <see cref="T:System.Net.IPEndPoint" /> version of <paramref name="s" />.</param>
<summary>Tries to convert an IP network endpoint (address and port) represented as a read-only span to its <see cref="T:System.Net.IPEndPoint" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
<returns>
<see langword="true" /> if <paramref name="s" /> can be parsed as an IP endpoint; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TryParse">
<MemberSignature Language="C#" Value="public static bool TryParse (string s, out System.Net.IPEndPoint result);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryParse(string s, [out] class System.Net.IPEndPoint&amp; result) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IPEndPoint.TryParse(System.String,System.Net.IPEndPoint@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function TryParse (s As String, ByRef result As IPEndPoint) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool TryParse(System::String ^ s, [Runtime::InteropServices::Out] System::Net::IPEndPoint ^ % result);" />
<MemberSignature Language="F#" Value="static member TryParse : string * IPEndPoint -&gt; bool" Usage="System.Net.IPEndPoint.TryParse (s, result)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Primitives</AssemblyName>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
<Parameter Name="result" Type="System.Net.IPEndPoint" RefType="out" Index="1" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="s">The IP endpoint to validate.</param>
<param name="result">When this method returns, the <see cref="T:System.Net.IPEndPoint" /> version of <paramref name="s" />.</param>
<summary>Tries to convert an IP network endpoint (address and port) represented as a string to its <see cref="T:System.Net.IPEndPoint" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
<returns>
<see langword="true" /> if <paramref name="s" /> can be parsed as an IP endpoint; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.