Instant .NET 4.5 Extension Methods How-to

Utilize and harness the power of extension methods in your .NET applications

Instant .NET 4.5 Extension Methods How-to

Starting
Shawn R. McLean

Utilize and harness the power of extension methods in your .NET applications
$19.99
RRP $19.99
eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849688567
Paperback52 pages

About This Book

  • 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

Who This Book Is 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.

Table of Contents

Chapter 1: Instant .NET 4.5 Extension Methods How-to
Your first extension method (Must know)
Extension methods on string data types (Must know)
Extension methods on classes (Should know)
Chaining extension methods (Should know)
Overloading extension methods (Should know)
Overriding extension methods (Should know)
Extension methods on interfaces (Should know)
Extension methods on enumerables (Should know)
Extension methods on IQueryable (Become an expert)
Extension methods with generics (Become an expert)
Extension methods with lambda expressions (Become an expert)
Structuring your project and best practices (Should know)
Appendix – List of well-known extension libraries

What You Will Learn

  • 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

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.

Authors

Table of Contents

Chapter 1: Instant .NET 4.5 Extension Methods How-to
Your first extension method (Must know)
Extension methods on string data types (Must know)
Extension methods on classes (Should know)
Chaining extension methods (Should know)
Overloading extension methods (Should know)
Overriding extension methods (Should know)
Extension methods on interfaces (Should know)
Extension methods on enumerables (Should know)
Extension methods on IQueryable (Become an expert)
Extension methods with generics (Become an expert)
Extension methods with lambda expressions (Become an expert)
Structuring your project and best practices (Should know)
Appendix – List of well-known extension libraries

Book Details

ISBN 139781849688567
Paperback52 pages
Read More

Recommended for You

Instant Razor View Engine How-to
$ 14.99