摘要:
委托是什么 大部分的解释是 委托是一个对方法的引用,可以不用自己执行,而是转交给其他对象。就好比每天都有一个黄毛旅行者,给npc做委托任务一样,npc并不是自己去做任务。 于是我们可以有以下代码,delegate就是声明一个委托,它的作用是调用sum方法 // See https://aka.ms/ 阅读全文
posted @ 2023-05-26 12:21
.net&new
阅读(86)
评论(0)
推荐(0)
摘要:
1 什么是反射 首先要复习一下C#的编译过程,可以解释为下图 其中dll/exe中,包括元数据(metadata)和IL(中间语言Intermediate Language) 另外还出现的其他名词:CLR(公共语言运行时,Common Language Runtime)和JIT(实时编译器 Just 阅读全文
posted @ 2023-05-26 12:07
.net&new
阅读(273)
评论(0)
推荐(0)
摘要:
线程管理类:SocketServer public class SocketServer { /// <summary> /// 接入池 /// </summary> private List<Client> clients= new List<Client>(); /// <summary> // 阅读全文
posted @ 2023-05-26 10:52
.net&new
阅读(13)
评论(0)
推荐(0)
摘要:
winfor的页面类 : using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using 阅读全文
posted @ 2023-05-26 10:41
.net&new
阅读(10)
评论(0)
推荐(0)
摘要:
using System.Net.Sockets;public class Client { /// <summary> /// 序列号 /// </summary> public int Number { get; set; } /// <summary> /// 用户超密 /// </summa 阅读全文
posted @ 2023-05-26 10:35
.net&new
阅读(11)
评论(0)
推荐(0)
浙公网安备 33010602011771号