وبلاگ بلیان

C# مؤثرتر: ۵۰ روش خاص برای بهبود C# شما

More Effective C#: 50 Specific Ways to Improve Your C#: 50 Specific Ways to Improve Your C#

معرفی کتاب «C# مؤثرتر: ۵۰ روش خاص برای بهبود C# شما» (با عنوان لاتین More Effective C#: 50 Specific Ways to Improve Your C#: 50 Specific Ways to Improve Your C#) نوشتهٔ Bill Wagner، منتشرشده توسط نشر Addison-Wesley Professional در سال 2008. این کتاب در 8 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.

“Shining a bright light into many of the dark corners of C# 3.0, this book not only covers the ‘how,’ but also the ‘why,’ arming the reader with many field-tested methods for wringing the most from the new language features, such as LINQ, generics, and multithreading. If you are serious about developing with the C# language, you need this book.” –Bill Craun, Principal Consultant, Ambassador Solutions, Inc. “More Effective C# is an opportunity to work beside Bill Wagner. Bill leverages his knowledge of C# and distills his expertise down to some very real advice about programming and designing applications that every serious Visual C# user should know. More Effective C# is one of those rare books that doesn’t just regurgitate syntax, but teaches you how to use the C# language.” –Peter Ritchie, Microsoft MVP: Visual C# “More Effective C# is a great follow-up to Bill Wagner’s previous book. The extensive C# 3.0 and LINQ coverage is extremely timely!” –Tomas Restrepo, Microsoft MVP: Visual C++, .NET, and Biztalk Server “As one of the current designers of C#, it is rare that I learn something new about the language by reading a book. More Effective C# is a notable exception. Gently blending concrete code and deep insights, Bill Wagner frequently makes me look at C# in a fresh light–one that really makes it shine. More Effective C# is at the surface a collection of very useful guidelines. Look again. As you read through it, you’ll find that you acquire more than just the individual pieces of advice; gradually you’ll pick up on an approach to programming in C# that is thoughtful, beautiful, and deeply pleasant. While you can make your way willy-nilly through the individual guidelines, I do recommend reading the whole book–or at least not skipping over the chapter introductions before you dive into specific nuggets of advice. There’s perspective and insight to be found there that in itself can be an important guide and inspiration for your future adventures in C#.” –Mads Torgersen, Program Manager, Visual C#, Microsoft “Bill Wagner has written an excellent book outlining the best practices for developers who work with the C# language. By authoring More Effective C#, he has again established himself as one of the most important voices in the C# community. Many of us already know how to use C#. What we need is advice on how to hone our skills so that we can become wiser programmers. There is no more sophisticated source of information on how to become a first-class C# developer than Bill Wagner’s book. Bill is intelligent, thoughtful, experienced, and skillful. By applying the lessons from this book to your own code, you will find many ways to polish and improve the work that you produce.” –Charlie Calvert, Community Program Manager, Visual C#, Microsoft In More Effective C#, Microsoft C# MVP and Regional Director Bill Wagner introduces fifty brand-new ways to write more efficient and more robust software. This all-new book follows the same format as Wagner’s best-selling Effective C# (Addison-Wesley, 2005), providing clear, practical explanations, expert tips, and plenty of realistic code examples. Wagner shows how to make the most of powerful innovations built into Microsoft’s new C# 3.0 and .NET Framework 3.5, as well as advanced C# language capabilities not covered in his previous book. Drawing on his unsurpassed C# experience, the author reveals new best practices for working with LINQ, generics, metaprogramming, and many other features. He also uncovers practices that compromise performance or reliability and shows exactly how to avoid them. More Effective C# shows how to Use generics to express your design intent more effectively Master advanced generics techniques, such as constraints, method constraints, and generic specialization Use the multithreaded techniques you’ll need to work with the .NET framework every day Express modern design idioms using the rich palette of C# language features Successfully mix object oriented and functional programming constructs Create composable interfaces and avoid confusion in public interfaces Use extension methods to separate contracts from implementation Program successfully with C# closures and anonymous types Write more effective LINQ queries Make the most of LINQ Lazy Evaluation Queries and Lambda Expressions Distinguish and convert between delegates and expression trees Efficiently utilize nullable types and partial classes Use implicit properties for mutable, nonserializable data You’re already a successful C# programmer–this book can help you become an outstanding one.

“shining A Bright Light Into Many Of The Dark Corners Of C# 3.0, This Book Not Only Covers The ‘how,’ But Also The ‘why,’ Arming The Reader With Many Field-tested Methods For Wringing The Most From The New Language Features, Such As Linq, Generics, And Multithreading. If You Are Serious About Developing With The C# Language, You Need This Book.”

–bill Craun, Principal Consultant, Ambassador Solutions, Inc.

“more Effective C# Is An Opportunity To Work Beside Bill Wagner. Bill Leverages His Knowledge Of C# And Distills His Expertise Down To Some Very Real Advice About Programming And Designing Applications That Every Serious Visual C# User Should Know. More Effective C# Is One Of Those Rare Books That Doesn’t Just Regurgitate Syntax, But Teaches You How To Use The C# Language.”

–peter Ritchie, Microsoft Mvp: Visual C#

“more Effective C# Is A Great Follow-up To Bill Wagner’s Previous Book. The Extensive

c# 3.0 And Linq Coverage Is Extremely Timely!”

–tomas Restrepo, Microsoft Mvp: Visual C++, .net, And Biztalk Server

“as One Of The Current Designers Of C#, It Is Rare That I Learn Something New About The Language By Reading A Book. More Effective C# Is A Notable Exception. Gently Blending Concrete Code And Deep Insights, Bill Wagner Frequently Makes Me Look At C# In A Fresh Light–one That Really Makes It Shine. More Effective C# Is At The Surface A Collection Of Very Useful Guidelines. Look Again. As You Read Through It, You’ll Find That You Acquire More Than Just The Individual Pieces Of Advice; Gradually You’ll Pick Up On An Approach Toprogramming In C# That Is Thoughtful, Beautiful, And Deeply Pleasant. While You Can Make Your Way Willy-nilly Through The Individual Guidelines, I Do Recommend Reading The Whole Book–or At Least Not Skipping Over The Chapter Introductions Before You Dive Into Specific Nuggets Of Advice. There’s Perspective And Insight To Be Found There That In Itself Can Be An Important Guide And Inspiration For Your Future Adventures In C#.”

–mads Torgersen, Program Manager, Visual C#, Microsoft

“bill Wagner Has Written An Excellent Book Outlining The Best Practices For Developers Who Work With The C# Language. By Authoring More Effective C#, He Has Again Established Himself As One Of The Most Important Voices In The C# Community. Many Of Us Already Know How To Use C#. What We Need Is Advice On How To Hone Our Skills So That We Can Become Wiser Programmers. There Is No More Sophisticated Source Of Information On How To Become A First-class C# Developer Than Bill Wagner’s Book. Bill Is Intelligent, Thoughtful, Experienced, And Skillful. By Applying The Lessons From This Book To Your Own Code, You Will Find Many Ways To Polish And Improve The Work That You Produce.”

–charlie Calvert, Community Program Manager, Visual C#, Microsoft

in More Effective C#, Microsoft C# Mvp And Regional Director Bill Wagner Introduces Fifty Brand-new Ways To Write More Efficient And More Robust Software. This All-new Book Follows The Same Format As Wagner’s Best-selling Effective C# (addison-wesley, 2005), Providing Clear, Practical Explanations, Expert Tips, And Plenty Of Realistic Code Examples.

wagner Shows How To Make The Most Of Powerful Innovations Built Into Microsoft’s New C# 3.0 And .net Framework 3.5, As Well As Advanced C# Language Capabilities Not Covered In His Previous Book. Drawing On His Unsurpassed C# Experience, The Author Reveals New Best Practices For Working With Linq, Generics, Metaprogramming, And Many Other Features. He Also Uncovers Practices That Compromise Performance Or Reliability And Shows Exactly How To Avoid Them.

more Effective C# Shows How To

  • use Generics To Express Your Design Intent More Effectively

  • master Advanced Generics Techniques, Such As Constraints, Method Constraints, And Generic Specialization

  • use The Multithreaded Techniques You’ll Need To Work With The .net Framework Every Day

  • express Modern Design Idioms Using The Rich Palette Of C# Language Features

  • successfully Mix Object Oriented And Functional Programming Constructs

  • create Composable Interfaces And Avoid Confusion In Public Interfaces

  • use Extension Methods To Separate Contracts From Implementation

  • program Successfully With C# Closures And Anonymous Types

  • write More Effective Linq Queries

  • make The Most Of Linq Lazy Evaluation Queries And Lambda Expressions

  • distinguish And Convert Between Delegates And Expression Trees

  • efficiently Utilize Nullable Types And Partial Classes

  • use Implicit Properties For Mutable, Nonserializable Data

you’re Already A Successful C# Programmer–this Book Can Help You Become An Outstanding One.

More Effective C#: 50 Specific Ways to Improve Your C#......Page 1 Table of Contents......Page 4 Copyright......Page 6 Praise for More Effective C#......Page 8 Effective Software Development Series......Page 10 Introduction......Page 11 1. Working with Generics......Page 15 Item 1. Use Generic Replacements of 1.x Framework API Classes......Page 18 Item 2. Define Constraints That Are Minimal and Sufficient......Page 26 Item 3. Specialize Generic Algorithms Using Runtime Type Checking......Page 30 Item 4. Use Generics to Force Compile-Time Type Inference......Page 36 Item 5. Ensure That Your Generic Classes Support Disposable Type Parameters......Page 41 Item 6. Use Delegates to Define Method Constraints on Type Parameters......Page 44 Item 7. Do Not Create Generic Specialization on Base Classes or Interfaces......Page 49 Item 8. Prefer Generic Methods Unless Type Parameters Are Instance Fields......Page 53 Item 9. Prefer Generic Tuples to Output and Ref Parameters......Page 57 Item 10. Implement Classic Interfaces in Addition to Generic Interfaces......Page 62 2. Multithreading in C#......Page 68 Item 11. Use the Thread Pool Instead of Creating Threads......Page 72 Item 12. Use BackgroundWorker for Cross-Thread Communication......Page 79 Item 13. Use lock() as Your First Choice for Synchronization......Page 83 Item 14. Use the Smallest Possible Scope for Lock Handles......Page 89 Item 15. Avoid Calling Unknown Code in Locked Sections......Page 93 Item 16. Understand Cross-Thread Calls in Windows Forms and WPF......Page 97 3. C# Design Practices......Page 105 Item 17. Create Composable APIs for Sequences......Page 106 Item 18. Decouple Iterations from Actions, Predicates, and Functions......Page 112 Item 19. Generate Sequence Items as Requested......Page 116 Item 20. Loosen Coupling by Using Function Parameters......Page 119 Item 21. Create Method Groups That Are Clear, Minimal, and Complete......Page 125 Item 22. Prefer Defining Methods to Overloading Operators......Page 131 Item 23. Understand How Events Increase Runtime Coupling Among Objects......Page 134 Item 24. Declare Only Nonvirtual Events......Page 137 Item 25. Use Exceptions to Report Method Contract Failures......Page 143 Item 26. Ensure That Properties Behave Like Data......Page 146 Item 27. Distinguish Between Inheritance and Composition......Page 152 4. C# 3.0 Language Enhancements......Page 157 Item 28. Augment Minimal Interface Contracts with Extension Methods......Page 158 Item 29. Enhance Constructed Types with Extension Methods......Page 162 Item 30. Prefer Implicitly Typed Local Variables......Page 164 Item 31. Limit Type Scope by Using Anonymous Types......Page 169 Item 32. Create Composable APIs for External Components......Page 173 Item 33. Avoid Modifying Bound Variables......Page 178 Item 34. Define Local Functions on Anonymous Types......Page 183 Item 35. Never Overload Extension Methods......Page 187 5. Working with LINQ......Page 191 Item 36. Understand How Query Expressions Map to Method Calls......Page 192 Item 37. Prefer Lazy Evaluation Queries......Page 202 Item 38. Prefer Lambda Expressions to Methods......Page 207 Item 39. Avoid Throwing Exceptions in Functions and Actions......Page 210 Item 40. Distinguish Early from Deferred Execution......Page 213 Item 41. Avoid Capturing Expensive Resources......Page 217 Item 42. Distinguish Between IEnumerable and IQueryable Data Sources......Page 228 Item 43. Use Single() and First() to Enforce Semantic Expectations on Queries......Page 232 Item 44. Prefer Storing Expression to Func......Page 235 6. Miscellaneous......Page 239 Item 45. Minimize the Visibility of Nullable Values......Page 240 Item 46. Give Partial Classes Partial Methods for Constructors, Mutators, and Event Handlers......Page 245 Item 47. Limit Array Parameters to Params Arrays......Page 250 Item 48. Avoid Calling Virtual Functions in Constructors......Page 254 Item 49. Consider Weak References for Large Objects......Page 257 Item 50. Prefer Implicit Properties for Mutable, Nonserializable Data......Page 260 Index......Page 264 A......Page 265 B......Page 266 C......Page 267 D......Page 269 E......Page 271 F......Page 273 G......Page 274 H......Page 276 I......Page 277 J......Page 280 K......Page 281 L......Page 282 M......Page 284 N......Page 286 O......Page 287 P......Page 288 Q......Page 289 R......Page 290 S......Page 292 T......Page 294 U......Page 295 V......Page 296 W......Page 297 X......Page 298 Y......Page 299 An authority on C# presents fifty specific, practical ways for developers to improve their C# programming skills, focusing on the features, tools, and applications of C# 3.0--including LINQ, generics, and multi-threading--and includes helpful suggestions on how to avoid common pitfalls and problems with the programming language. Original. (Intermediate)
دانلود کتاب C# مؤثرتر: ۵۰ روش خاص برای بهبود C# شما