摘要: class Program { static void Main(string[] args) { Stream s = new MemoryStream(); for (int i = 0; i < 500; i++) { s.WriteByte((byte)i); } s.Position = 阅读全文
posted @ 2021-03-26 14:26 摩诘 阅读(936) 评论(0) 推荐(0) 编辑
摘要: 1、服务端建立监听,等待客户端连接 class Program { static void Main(string[] args) { TcpListener listener = new TcpListener(IPAddress.Parse("127.0.0.1"), 8000); Consol 阅读全文
posted @ 2021-03-26 14:13 摩诘 阅读(935) 评论(0) 推荐(1) 编辑
摘要: 1、简单的说,虚方法就是可以被子类重写的方法,如果子类重写了虚方法,那么运行时将使用重写后的逻辑,如果没有重写,则使用父类中虚方法的逻辑 class Program { static void Main(string[] args) { Person per = new Person(); Poli 阅读全文
posted @ 2021-03-26 10:38 摩诘 阅读(76) 评论(0) 推荐(0) 编辑