C#事件-1
来源:互联网 发布:流程优化 编辑:程序博客网 时间:2024/06/03 14:56
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Wrox.ProCSarp.Delegates{public class CarInfoEventArgs:EventArgs{public CarInfoEventArgs(string car){this.Car = car;}public string Car {get; private set;}}public class CarDealer{public event EventHandler<CarInfoEventArgs> NewCarInfo;public void NewCar(string car){Console.WriteLine ("CarDealer, new car{0}", car);RaiseNewCarInfo(car);}protected virtual void RaiseNewCarInfo(string car){EventHandler<CarInfoEventArgs> newCarInfo = NewCarInfo;if (newCarInfo != null){newCarInfo(this, new CarInfoEventArgs(car));}}}}
阅读全文
0 0
- c#事件(1)
- c# 事件 (1)
- C#事件-1
- 探寻C#事件本质1
- c#事件
- c#事件
- C#事件
- c#事件
- C#事件
- C#事件
- c#事件
- C#事件
- c#事件
- C#事件
- c#事件
- C#事件
- c# 事件
- C#事件
- ubuntu系统下安装php环境和搭建LAMP
- 二进制表示
- 队列
- HBase Shell 常用命令及例子 (总结12)
- XListView 下拉刷新 上拉记载 (此方法只能在Android Studio中使用!)
- C#事件-1
- poj 1328 Radar Installation
- [SDUT](2112 && 1139)数据结构实验之链表七:单链表中重复元素的删除 ---链表操作(线性表)
- 推荐书目1
- EOJ 1082 Easy to AC(枚举+二进制子集法)
- Linux下用Eclipse构建HBase开发环境 (总结13)
- 【004】Java语言(JDK的下载与安装)
- c3p0的简单说明
- Linq基础总结