My whirlwind tour of C# features continues with Whirlwind 3: What's new in C# 2 - Partial types, anonymous methods on Microsoft's Channel 9.
Partial types are quick and easy: split class, struct, and interface definitions across multiple files. I don't cover them in the screencast, but in addition to partial types there are also partial methods, see the resources for details.
Anonymous methods are more involved: pass a block of code inline anywhere a delegate is expected. It's a good idea to understand this concept, since lambda expressions in C# 3.0 build on anonymous methods. You'll see that in a future whirlwind episode.
Partial Classes and Methods, C# Programming Guide, MSDN Library
partial (Type), C# Reference, MSDN Library
partial (Method), C# Reference, MSDN Library
Anonymous Methods, C# Programming Guide, MSDN Library
Delegates, C# Programming Guide, MSDN Library
delegate, C# Reference, MSDN Library
Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes, Juval Löwy, MSDN Magazine, Visual Studio 2005 Guided Tour issue, 2006 (Vol. 21, No. 3)
Introduction to C# Anonymous Methods, Patrick Smacchia, TheServerSide.NET
Fun with Anonymous Methods, blog post by Brad Adams. The mischievous kind of fun.
Closures and Continuations, blog post by Don Box.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Stuart Celarier
Sign In