People often find it difficult to see the difference between events and delegates. C# doesn't help matters by allowing you to declare field-like events which are automatically backed by a delegate variable of the same name. This article aims to clari…
Events, Protocols and Delegates   事件.协议和委托 This article presents the key iOS technologies used to receive callbacks and to populate user interface controls with data. These technologies are events, protocols, and delegates. This article explains what…
(1)什么是多态, 多态就是一个类表现出多种不同的形态, 他的核心是子类对象作为父类对象使用 (2)怎么实现多态, 在Csharp中,可以用接口, 虚方法, 抽象类实现多态,当然,不管是这三种的那一个来实现多态,都需要借助于继承来实现 (3)首先看一下什么是接口, 接口可以看做是一个标准, 所有继承的子类需要按照接口中声明的方法来实现 (4)然后看一下什么是虚方法,虚方法是用virtual修饰,在子类中用override进行重写,它是是一个方法放在类里面,可以选择在子类中进行重写,或者不重写 (…
I was thinking that the previous post on Events and Delegates was quite self-explanatory. A couple of days ago, I received an email which said that may be it is not that good as to explain what I want to achieve in life through that event. So, I thou…
I hear a lot of confusion around Delegates in C#, and today I am going to give it shot of explaining the stuff with easy to understand examples. First things first... I will consciously try NOT to use any technical jargon to explain this concept. So…
自己比较懒,有的时候想写点东西,但由于文笔不行.技术不行也就没有怎么写.经常是用到什么.学习什么的时候,简单写点,权当是个学习笔记.上博客的次数也很少,有人给我留言也是没有怎么及时的回复,深感抱歉! 在一些特殊的行业,比如我从事的GIS.地质行业,大部分软件还是以C/S形式存在,软件大多是产品来销售.这些程序大部分是Cpp语言来编写,一方面是考虑到效率问题,另一方面可能是因为历史原因,创建者使用Cpp,后面接班人也就继续使用. 但是使用Cpp去做项目的时候,又会倍感cpp的笨拙,做个界面非常费劲…
https://dzone.com/refcardz/csharp C#Development 13 Things Every C# Developer Should Know Written by Jon JarboeSenior Technical Manager, Coverity Gives 13 useful tips and references for using C#, a simple, modern, general purpose, object-oriented, mul…
Long time without coding,貌似对programming都失去了曾有的一点点sense了,今日有空再细瞄一下.net的委托和事件. Delegate 首先,委托用于引用一类具有相同返回值和参数列表的方法(可以引用静态方法或者是实例方法),类似于函数指针,用于实现函数回调.例如,我们如下声明了委托ProgressChangedDelegate,用于引用参数是int,返回void的方法. /// <summary> /// 进度改变通知委托 /// </summary&…
Store App 特别适用于 MVVM 模式.由于要用到 SQLite,Bing Maps,所以第一步从网上搜索并安装这两个扩展.很难想象在智能手机上运行 SQL Server 这种巨无霸型数据库,SQLite 便成为首选.运行 SQLite,需要 C++ 扩展,而解决方案属性 => 配置管理中,CPU 也不能是 Any,应改为 x86.安装后,其添加引用窗口的 扩展 项如下: 第二步,当然是下载源代码了.可到我的置顶随笔 x01.Lab.Download 中获取.解压后,双击 Lab.sln…
This is a quick guide covering nearly all of Nemerle's features. It should be especially useful to anyone who is already familiar with C# or a similar language: Table of Contents Variables Operators Logical Operators Bit Operators Type Casts/Conversi…