System.Net.Policy.ClientAccessPolicy.ParsePort C# (CSharp) Method

ParsePort() static private method

static private ParsePort ( string s ) : ushort
s string
return ushort
		static ushort ParsePort (string s)
		{
			ushort port;
			if (!UInt16.TryParse (s, out port) || (port < AccessPolicy.MinPort) || (port > AccessPolicy.MaxPort))
				throw new XmlException ("Invalid port");
			return port;
		}
	}