Instant .NET 4.5 Extension Methods How-to
暫譯: 即時 .NET 4.5 擴展方法實用指南
Shawn R. McLean
- 出版商: Packt Publishing
- 出版日期: 2013-04-18
- 售價: $1,350
- 貴賓價: 9.5 折 $1,283
- 語言: 英文
- 頁數: 52
- 裝訂: Paperback
- ISBN: 1849688567
- ISBN-13: 9781849688567
-
相關分類:
.NET
海外代購書籍(需單獨結帳)
相關主題
商品描述
Utilize and harness the power of extension methods in your .NET applications
Overview
- Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
- Explains how to write your own extension methods on types ranging from primitive to complex
- Shows caveats to watch out for and apply workarounds to them
- Helps to better architect your applications to maximize code maintainability
In Detail
.NET extension methods is an essential feature to know and understand for all .NET developers. Usage of extension methods is found in applications ranging from small to large scale enterprise systems built using the .NET framework. Create and use extension methods the correct way to save your development time and maintainability costs.
Instant .NET 4.5 Extension Methods How-to is a practical, hands-on guide that provides you with a number of clear, step-by-step exercises that will help you take advantage of the real power that is behind extension methods and gives you good knowledge of how to use them in your .NET applications.
This book covers how to create, write, and use different types of extension methods. It will take you through a number of clear, practical recipes that will help you take advantage of the power of extension methods in the quickest possible way.
You will also learn exactly how to create extension methods on strings, interfaces, classes such as IQueryable and IEnumerable, and so on. You will write them from scratch and then use them practically in your application. You will also learn the most suitable scenarios for using these extension methods.You will learn everything you need to know about creating your own extension methods and using them and other external extension methods.
What you will learn from this book
- Extending primitive and complex types
- Tricks and caveats of extending the string data type
- Method chaining using extension methods
- Extending interfaces while taking inheritance into consideration
- Structuring your project to incorporate proper namespace convention when using extension methods
- Knowing how and when to extend IEnumerable versus IQueryable for performance and optimization of queries
- Structuring your project to incorporate proper namespace convention when using extension methods
Approach
Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks.The book is packed with quick recipes on creating and extending extension methods in your .NET applications.
Who this book is written for
This book is for developers in C# and the .NET framework, with a basic understanding of language syntax and OOP concepts. Readers are expected to have some experience in finding their way around Visual Studio.
商品描述(中文翻譯)
利用並發揮擴展方法在您的 .NET 應用程式中的力量
概述
- 立即學習新知!一本短小、快速、專注的指南,提供即時結果。
- 解釋如何在從基本到複雜的類型上編寫自己的擴展方法。
- 顯示需要注意的陷阱並提供解決方法。
- 幫助您更好地架構應用程式,以最大化代碼的可維護性。
詳細內容
.NET 擴展方法是所有 .NET 開發人員必須了解和掌握的重要特性。擴展方法的使用可見於從小型到大型企業系統的應用程式,這些系統是使用 .NET 框架構建的。正確創建和使用擴展方法可以節省您的開發時間和維護成本。
《Instant .NET 4.5 Extension Methods How-to》是一本實用的、動手操作的指南,提供多個清晰的逐步練習,幫助您利用擴展方法背後的真正力量,並讓您充分了解如何在 .NET 應用程式中使用它們。
本書涵蓋如何創建、編寫和使用不同類型的擴展方法。它將帶您通過多個清晰、實用的配方,幫助您以最快的方式利用擴展方法的力量。
您還將學習如何在字串、介面、類別(如 IQueryable 和 IEnumerable)等上創建擴展方法。您將從頭開始編寫它們,然後在應用程式中實際使用。您還將學習使用這些擴展方法的最合適場景。您將學到創建自己的擴展方法及使用它們和其他外部擴展方法所需的所有知識。
您將從本書中學到的內容
- 擴展基本和複雜類型
- 擴展字串資料類型的技巧和注意事項
- 使用擴展方法進行方法鏈接
- 在考慮繼承的情況下擴展介面
- 結構化您的專案以在使用擴展方法時納入適當的命名空間慣例
- 知道何時以及如何擴展 IEnumerable 與 IQueryable 以優化查詢性能
- 結構化您的專案以在使用擴展方法時納入適當的命名空間慣例
方法
本書充滿了實用的逐步指導和對最重要、最有用任務的清晰解釋。書中包含了快速的配方,幫助您在 .NET 應用程式中創建和擴展擴展方法。
本書的讀者對象
本書適合 C# 和 .NET 框架的開發人員,要求具備基本的語言語法和物件導向程式設計(OOP)概念的理解。讀者應具備一定的 Visual Studio 使用經驗。