- 博客(6)
- 资源 (2)
- 收藏
- 关注
转载 C#sealed_161206
sealed修饰类,不能其他类继承该类class A {}sealed class B:A{}任何类都不能继承B类了在下面的示例中,Z 从 Y 继承,但 Z 无法重写在 X 中声明并在 Y 中密封的虚函数 F class X { protected virtual void F() { Console.WriteLine("X.F"); }
2016-12-06 08:35:48 201
原创 C#委托_161205
委托和类一样,是用户自己定义的类型,类表示数据和方法,委托是持有一个或者多个方法(1)声明一个委托看起来跟方法相似,但是没有实现(2)使用委托类型声明一个委托变量(3)创建委托类型的变量,把他赋值给委托变量(4)在代码中可以像调用方法一样调用委托,在调用委托的时候,每一个方法都会被执行
2016-12-05 17:59:21 153
原创 C#事件event_161205
event必须声明在一个类里面事件和方法属性一样,是类或者结构的成员声明一个eventcalss Incrementer{public event Eventhandler CountedADozen;Eventhandle 委托类型Counted 事件名}订阅事件订阅者向事件添加事件处理程序。必须有和事件的委托相同的返回类型和签名incrementer
2016-12-05 17:41:37 250
翻译 Asynchronous Programming with async and await (C#)用async和await实现异步编程
You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous application
2016-12-02 17:20:52 287
原创 c#InvokeRequired
public void Function(){ if (this.InvokeRequired) { this.BeginInvoke(new Action(this.Function)); return; } // controller.DoSomething(); }其他线程想调用这个函数,这个时
2016-12-02 15:58:59 4440
原创 WCF
WCF的几种模式http最慢的,可以用于所以设备之间的通信,不同系统,不同设备都没问题tcp速度快,但是只支持相同的系统pipe同一台电脑不同application之间的通信。速度最快
2016-12-01 21:56:54 225
The Challenges of Threat Modeling Modern Applications现代威胁建模的挑战
2022-03-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人