进程与线程
摘要:进程与线程: 进程: 进程是操作系统资源分配的单位,其中存放dll,代码,堆,栈 线程: 调度单位 多线程优点: 1.提高响应能力:GUI程序,主线程操作UI,耗时操作放在工作线程中 2.提高程序性能 线程有哪些开销: 空间上: 1.数据结构上 C#:Thread 类 CLR: Thread (C+
阅读全文
委托作为回调
摘要:这是委托最常用的用法 比如有这样一个需求,注册一个用户,然后需要发送邮件和短信通知 注册对象代码: 1 /// <summary> 2 /// 注册数组传输对象. 3 /// Data Transfer Object 4 /// </summary> 5 public class RegisteDt
阅读全文
委托封装验证功能
摘要:1 namespace ConsoleApp1.Delegate.Day3 2 { 3 using System; 4 using System.Collections.Generic; 5 using System.Linq; 6 using System.Text; 7 using System
阅读全文
C#中struct和class的区别
摘要:一、定义和使用非常相似: 1.定义和使用: public struct Student { string Name; int Age; } public class Student2 { string Name; int Age; } Student student = new Student();
阅读全文