/// <devdoc> /// <para> /// Creates a new instance of the IPEndPoint class with the specified address and port. /// </para> /// </devdoc> public IPEndPoint(long address, int port) { if (!TcpValidationHelpers.ValidatePortNumber(port)) { throw new ArgumentOutOfRangeException(nameof(port)); } _port = port; _address = new IPAddress(address); }
/// <summary> /// Creates a new instance of the IPEndPoint class with the specified address and port. /// </summary> public IPEndPoint(IPAddress address, int port) { ArgumentNullException.ThrowIfNull(address); if (!TcpValidationHelpers.ValidatePortNumber(port)) { throw new ArgumentOutOfRangeException(nameof(port)); } _port = port; _address = address; }
/// <devdoc> /// <para> /// Creates a new instance of the IPEndPoint class with the specified address and port. /// </para> /// </devdoc> public IPEndPoint(IPAddress address, int port) { if (address == null) { throw new ArgumentNullException("address"); } if (!TcpValidationHelpers.ValidatePortNumber(port)) { throw new ArgumentOutOfRangeException("port"); } _port = port; _address = address; }