10 2023 档案
使用Channel传递数据
摘要:上次我们使用了事件异步传递数据,这次我们使用Channel在一个线程通信传递数据 直接上代码 public static class ChannelSample { private static readonly Channel<KeyValuePair<string, string>> chann
通过委托和事件异步传递数据
摘要:今天带大家了解一下委托和事件 直接上代码 1、首先定义传输的数据类型,个人写例子的时候比较习惯Student或Person,你们随意 public class Student { public int Id { get; set; } public string Name { get; set; }