Ray's playground

 

2011年2月14日

Item 24: Express Callbacks with Delegates(Effective C#)

摘要: Delegates provide the best way to utilize callbacks at runtime, with simplerrequirements on client classes. You can configure delegate targets at runtime.You can support multiple client targets. Client callbacks should beimplemented using delegates in .NET. 阅读全文

posted @ 2011-02-14 21:10 Ray Z 阅读(154) 评论(0) 推荐(0)

Item 23: Understand How Interface Methods Differ from Virtual Methods(Effective C#)

摘要: codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;56namespaceEffectiveCSharpItem237{8interfaceIMsg9{10voidMessage();11}1213publicclassMyClass:IMsg14{15publicvoidMessa 阅读全文

posted @ 2011-02-14 20:30 Ray Z 阅读(160) 评论(0) 推荐(0)

NSArrayController(Chapter 8 of Cocoa Programming for Mac OS X)

摘要: PersonCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1#import"Person.h"234@implementationPerson56-(id)init7{8[superinit];9expectedRaise=5.0;10personName=@"NewPerson";11returnself;12}1314-(void)dealloc15{16[personNamerelease];1 阅读全文

posted @ 2011-02-14 17:48 Ray Z 阅读(428) 评论(0) 推荐(0)

导航