class1.cs

来自「c#网络编程及应用-刘瑞新」· CS 代码 · 共 17 行

CS
17
字号
using System;
using System.Net;
class TestIPEndPoint
{
	public static void Main()
	{
		IPAddress ip=IPAddress.Parse("127.0.0.1");
		IPEndPoint iep=new IPEndPoint(ip,8000);
		Console.WriteLine("The IPEndPoint is:{0}",iep.ToString());
		Console.WriteLine("The Address is:{0}",iep.Address);
		Console.WriteLine("The AddressFamily is:{0}",iep.AddressFamily);
		Console.WriteLine("The max port number is:{0}",IPEndPoint.MaxPort);
		Console.WriteLine("The min port number is:{0}",IPEndPoint.MinPort);
		Console.Read();
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?