《C# 5.0 in a Nutshell》简介:
When you have a question about how to use C# 5.0 or the .NET CLR, this highly acclaimed bestseller has precisely the answers you need. Uniquely organized around concepts and use cases, this fifth edition include in-depth cover of concurrency and asynchrony new to C# 5.0 as well as continued coverage of parallel programming, code contracts, dynamic programming, security and COM interoperability. You'll also find updated information on language enhancements such as Caller Info Attributes, ReadOnlyDictionary, Web Sockets, and the new HttpClient class. This handy book has all you need to stay on track with C# 5.0. Get up to speed on C# language basics, including syntax, types, and variables Explore advanced topics such as unsafe code and preprocessor directives Learn C# 5.0 features such as concurrency and asynchrony Work with .NET 4.5's rich set of features for parallel programming, code contracts, and the code security model Understand .NET topics, including XML, collections, I/O and networking, memory management, reflection, attributes, security, and native interoperability
《C# 5.0 in a Nutshell》摘录:
• Conditionally including an attribute • Changing the declared type of variable • Switching between different namespaces or type aliases in a using directive— for example: using TestType = #if V2 MyCompany.Widgets.GadgetV2; #else MyCompany.Widgets.Gadget; #endif