• Complain

Sudipta Mukherjee - .NET 4.0 Generics Beginners Guide

Here you can read online Sudipta Mukherjee - .NET 4.0 Generics Beginners Guide full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: Packt Publishing, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Sudipta Mukherjee .NET 4.0 Generics Beginners Guide
  • Book:
    .NET 4.0 Generics Beginners Guide
  • Author:
  • Publisher:
    Packt Publishing
  • Genre:
  • Year:
    2012
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

.NET 4.0 Generics Beginners Guide: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book ".NET 4.0 Generics Beginners Guide" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Enhance the type safety of your code and easily create applications using .Net Generics 4.0 Learn how to use Generics methods and generic collections to solve complicated problems. Develop real-world applications using Generics Know the importance of each generic collection and Generic class and use them as per your requirements Benchmark the performance of all Generic collections In Detail Generics were added as part of .NET Framework 2.0 in November 2005. Although similar to generics in Java, .NET generics do not apply type erasure but every object has unique representation at run-time. There is no performance hit from runtime casts and boxing conversions, which are normally expensive..NET offers type-safe versions of every classical data structure and some hybrid ones. This book will show you everything you need to start writing type-safe applications using generic data structures available in Generics API. You will also see how you can use several collections for each task you perform. This book is full of practical examples, interesting applications, and comparisons between Generics and more traditional approaches. Finally, each container is bench marked on the basis of performance for a given task, so you know which one to use and when. This book first covers the fundamental concepts such as type safety, Generic Methods, and Generic Containers. As the book progresses, you will learn how to join several generic containers to achieve your goals and query them efficiently using Linq. There are short exercises in every chapter to boost your knowledge. The book also teaches you some best practices, and several patterns that are commonly available in generic code. Some important generic algorithm definitions are present in Power Collection (an API created by Wintellect Inc.) that are missing from .NET framework. This book shows you how to use such algorithms seamlessly with other generic containers. The book also discusses C5 collections. Java Programmers will find themselves at home with this API. This is the closest to JCF. Some very interesting problems are solved using generic containers from .NET framework, C5, and PowerCollection Algorithms - a clone of Google Set and Gender Genie for example! What you will learn from this book How different kinds of generic listsare related How to implement your own generic list Query every kind of generic container alike with Linq Standard Query Operators Augment .NET collections with general purpose algorithms available in C5 and PowerCollection Build concurrent apps in breathing easy steps. Find those algorithms you have been missing in .NET framework in PowerCollection and C5 API. Learn how different generic collections/containers perform under benchmarking, and when to use one over another Port your STL code blocks to .NET Generics which can be very handy if you are a veteran C++ developer and looking for an alternative in .NET world. Approach This is a concise, practical guide that will help you learn Generics in .NET, with lots of real world and fun-to-build examples and clear explanations. It is packed with screenshots to aid your understanding of the process. Who this book is written for This book is aimed at beginners in Generics. It assumes some working knowledge of C# , but it isnt mandatory. The following would get the most use out of the book: Newbie C# developers struggling with Generics. Experienced C++ and Java Programmers who are migrating to C# and looking for an alternative to other generic frameworks like STL and JCF would find this book handy. Managers who want to know what Generics is and how to put it to good use. Architects will find the benchmarking extremely useful, because its the first of its kind across a framework of several collections.

Sudipta Mukherjee: author's other books


Who wrote .NET 4.0 Generics Beginners Guide? Find out the surname, the name of the author of the book and a list of all author's works by series.

.NET 4.0 Generics Beginners Guide — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book ".NET 4.0 Generics Beginners Guide" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
.NET 4.0 Generics

.NET 4.0 Generics
Beginner's Guide

Copyright 2012 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2012

Production Reference: 1190112

Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK.

ISBN 978-1-84969-078-2

www.packtpub.com

Cover Image by Asher Wishkerman (<>)

Credits

Author

Sudipta Mukherjee

Reviewers

Atul Gupta

WEI CHUNG, LOW

Antonio Radesca

Acquisition Editor

David Barnes

Lead Technical Editor

Meeta Rajani

Technical Editors

Veronica Fernandes

Copy Editor

Laxmi Subramanian

Project Coordinator

Vishal Bodwani

Proofreader

Joanna McMahon

Indexer

Monica Ajmera Mehta

Rekha Nair

Graphics

Manu Joseph

Production Coordinator

Alwin Roy

Cover Work

Alwin Roy

Foreword

It is my pleasure to write the foreword to a book which will introduce you to the world of generic programming with C# and other .NET languages. You will be able to learn a lot from this book, as it introduces you to the elegant power of generic programming in C#. Through it, you will become a better C# programmer, and a better programmer in all future languages you might choose to use.

It is now almost 10 years since .NET Generics was first described in publications from Microsoft Research, Cambridge, a project I was able to lead and contribute to, and six years since it was released in product form in C# 2.0. In this foreword, I would like to take a moment to review the importance of .NET Generics in the history of programming languages, and the way it continues to inspire a new generation of programmers.

When we began the design of C# and .NET Generics, generic programming was not new. However, it was considered to be outside the mainstream, and attempts to change that with C++ templates and proposals for Java Generics were proving highly problematic for practitioners. At Microsoft Research, we pride ourselves on solving problems at their core. The three defining core features of .NET Generics as we designed them were efficient generics over value types with code generation and sharing managed by the virtual machine, reified run-time types, and language neutrality.

These technical features are now widely acknowledged to represent the "right" fundamental design choices for programming language infrastructure. They are not easy to design or build, and they are not easy to deliver, and when Microsoft Research embarked on this project, we believe we put the .NET platform many years ahead of its rivals. The entire credit goes to Microsoft and people such as Bill Gates, Eric Rudder, and Anders Hejlsberg for taking the plunge to push this into our range of programming languages. However, without the prototyping, research, engineering, and incessant advocacy by Microsoft Research, C# and .NET Generics would never be in their current form.

Let's take some time to examine why this was important. First, .NET Generics represents the moment where strongly typed and functional programming entered the mainstream..NET Generics enabled C# to become more functional (through LINQ, Lambdas, and generic collections), and it enabled a new class of strongly typed, fully functional .NET languages (such as F#) to thrive. Further, .NET Generics also enabled new key programming techniques, such as Async programming in F# 2.0 and C# 5.0, and Rx programming for reactive systems. Even though you may not realize it, you'll have learned a lot of functional programming by the end of this book.

Next, .NET Generics categorically proved that strongly typed object-oriented programming can integrate seamlessly with generic programming. It is hard to describe the extent to which .NET Generics managed to defeat the "object fundamentalists" of the 1990s (who want a world where there is nothing but classes). These people, many still occupying powerful positions in the software industry, seemed satisfied with a world where programmers are less productive, and programs less efficient, in the name of orthodoxy. Today, no practicing programmer or language designer with experience of .NET Generics would design a strongly typed programming language that does not include Generics. Further, almost every .NET API now features the use of .NET Generics, and it has become an essential weapon in the programmer's toolkit for solving many problems.

Finally, and for me most importantly, .NET Generics represents the victory of pragmatic beauty over pragmatic ugliness. In the eyes of many, alternative solutions to the problem of generic programming such as Java's "erasure" of Generics are simply unpleasant "hacks". This leads to reduced productivity when using those languages. In contrast, .NET Generics is perhaps the most smoothly integrated advanced programming language feature ever constructed. It integrates with reflection, .NET NGEN pre-compilation, debugging, and run-time code generation. I've had many people e-mail me to say that .NET Generics is their favorite programming language feature. That is what language research is all about.

I trust you will learn a great deal from this book, and enjoy the productivity that comes from C#, and .NET languages such as F#.

Dr. Don Syme Principal Research, Microsoft Research, Cambridge, U.K.

Generic types are more than just lists of T. Functional programmers have known this for a long time. C++ programmers who use templates knew this too. But 10 years ago when Don Syme and I first designed and prototyped the Generics feature of the .NET run-time, most mainstream developers were constrained by the rudimentary type systems of languages such as Visual Basic and Java, writing type-generic code only by resorting to casting tricks or worse. In that space, it's hard to conceive of myriad uses of generic types beyond lists and simple collections, and it's fair to say that there was some resistance to our design! Fortunately, some forward thinkers in Microsoft's .NET run-time team regarded Generics in managed languages as more than an academic indulgence, and committed substantial resources to completing a first-class implementation of Generics that is deeply embedded in the run-time languages and tools.

We've come a long way in 10 years! Managed code frameworks make liberal use of generic types, ranging from obvious collection types such as List and Dictionary, through `action' types such as Func and IEnumerable, to more specialized use of Generics such as Lazy initialization. Blogs and online forums are full of discussions on sophisticated topics such as variance and circular constraints. And if it weren't for Generics, it's hard to see how newer language features such as LINQ, or even complete languages such as F#, could have got off the ground.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «.NET 4.0 Generics Beginners Guide»

Look at similar books to .NET 4.0 Generics Beginners Guide. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «.NET 4.0 Generics Beginners Guide»

Discussion, reviews of the book .NET 4.0 Generics Beginners Guide and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.