08 2012 档案
《C#高级编程》之委托与事件总结
摘要:1、回调函数 回调函数实际上是方法调用的指针,又称函数指针。.NET以委托的形式实现了函数指针的概念。 但与C函数指针不同的地方在于:.NET委托是类型安全的。 .NET中的方法依托于类实例。所以不能直接将方法作为参数传递。而如果要传递方法,必须把方法封装在委托对象中,委托对象一般简称为委托。委托包含了方法细节信息。2、声明委托delegate void VoidOperation(uint x); 委托实现派生自System.MulticastDelegate,而System.MulticastDelegate又派生自System.Delegate。3、使用委托private dele...
阅读全文
Online Music Store: EF 4 Code Only方式出错"Model compatibility cannot be checked because the database does not contain"
摘要:Model compatibility cannot be checked because the database does not contain出现这个异常,就像网上说的可能是你已经创建了同名数据库,先drop掉。为了更加彻底,最好重启mysql服务。
阅读全文
浙公网安备 33010602011771号