上一页 1 ··· 4 5 6 7 8

2017年9月6日

设计模式之策略模式

摘要: 策略模式定义, 先看看维基上如何定义的: The strategy pattern(also known as the policy pattern) is a behavioural software design pattern that enables selecting an algorit 阅读全文

posted @ 2017-09-06 23:36 张居斜 阅读(130) 评论(0) 推荐(0) 编辑

2017年9月2日

c# typeof 与 GetType 作用与区别

摘要: 官方解释: Used to obtain the "System.Type" object for a type. A 'typeof‘ expression takes the following for: 可以理解为: 可用 'typeof' 来获取对象 ‘x' 的类型, 得到的 Type 类型 阅读全文

posted @ 2017-09-02 21:32 张居斜 阅读(484) 评论(0) 推荐(0) 编辑

2017年8月27日

c# 事件

摘要: c# 事件: 1. 创建发布器, 一般放在发布器类中(委托与事件必须在同一个类中)。 2. 创建订阅器, 放在订阅器类中。 3. 在主函数中调用, 触发事件。 3.1 不能直接调用事件触发, 调用发布器类中封装的函数来触发事件。 阅读全文

posted @ 2017-08-27 11:41 张居斜 阅读(121) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8

导航