Cover image for .NET 4.0 Generics Beginner’s Guide.
.NET 4.0 Generics Beginner’s Guide.
Title:
.NET 4.0 Generics Beginner’s Guide.
Author:
Mukherjee, Sudipta.
ISBN:
9781849690799
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (501 pages)
Contents:
.NET 4.0 Generics -- Table of Contents -- .NET 4.0 Generics -- Credits -- Foreword -- About the Author -- Acknowledgement -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Time for action - heading -- What just happened? -- Pop quiz - heading -- Have a go hero - heading -- Reader feedback -- Customer support -- Downloading the example code -- Errata -- Piracy -- Questions -- 1. Why Generics? -- An analogy -- Reason 1: Generics can save you a lot of typing -- Reason 2: Generics can save you type safety woes, big time -- What's the problem with this approach? -- Reason 3: Generics leads to faster code -- Reason 4: Generics is now ubiquitous in the .NET ecosystem -- Setting up the environment -- Summary -- 2. Lists -- Why bother learning about generic lists? -- Types of generic lists -- Checking whether a sequence is a palindrome or not -- Time for action - creating the generic stack as the buffer -- What just happened? -- Time for action - completing the rest of the method -- What just happened? -- Designing a generic anagram finder -- Time for action - creating the method -- What just happened? -- Have a go hero - use this method to find anagrams from a dictionary -- Life is full of priorities, let's bring some order there -- Time for action - creating the data structure for the prioritized shopping list -- What just happened? -- Time for action - let's add some gadgets to the list and see them -- What just happened? -- Time for action - let's strike off the gadgets with top-most priority after we have bought them -- What just happened? -- Time for action - let's create an appointment list -- What just happened?.

Live sorting and statistics for online bidding -- Time for action - let's create a custom class for live sorting -- What just happened? -- Why did we have three LinkedList as part of the data structure? -- Pop quiz -- An attempt to answer questions asked by your boss -- Time for action - associating products with live sorted bid amounts -- What just happened? -- Time for action - finding common values across different bidding amount lists -- What just happened? -- Have a go hero - finding common demographic statistics for the bidders -- You will win every scrabble game from now on -- Time for action - creating the method to find the character histogram of a word -- Time for action - checking whether a word can be formed -- Time for action - let's see whether it works -- Pop quiz -- Have a go hero - explain the code! -- Trying to fix an appointment with a doctor? -- Time for action - creating a set of dates of the doctors' availability -- What just happened? -- Time for action - finding out when both doctors shall be present -- What just happened? -- Pop quiz -- Revisiting the anagram problem -- Time for action - re-creating the anagram finder -- What just happened? -- Lists under the hood -- Summary -- 3. Dictionaries -- Types of generic associative structures -- Creating a tag cloud generator using dictionary -- Time for action - creating the word histogram -- What just happened? -- Have a go hero -- Pop quiz -- Creating a bubble wrap popper game -- Time for action - creating the game console -- What just happened? -- Look how easy it was! -- How did we decide we need a dictionary and not a list? -- Let's build a generic autocomplete service -- Time for action - creating a custom dictionary for autocomplete -- What just happened? -- Time for action - creating a class for autocomplete -- What just happened?.

The most common pitfall. Don't fall there! -- Let's play some piano -- Time for action - creating the keys of the piano -- What just happened? -- How are we recording the key strokes? -- Time for action - switching on recording and playing recorded keystrokes -- How it works? -- C# Dictionaries can help detect cancer. Let's see how! -- Time for action - creating the KNN API -- What just happened? -- Time for action - getting the patient records -- Time for action - creating the helper class to read a delimited file -- What just happened? -- Time for action - let's see how to use the predictor -- What just happened? -- Tuples are great for many occasions including games -- Time for action - putting it all together -- What just happened? -- Why have we used Tuples? -- How did we figure out whether the game is over or not? -- Have a go hero -- Summary -- 4. LINQ to Objects -- What makes LINQ? -- Extension methods -- Time for action - creating an Extension method -- What just happened? -- Time for action - consuming our new Extension method -- What just happened? -- Check out these guidelines for when not to use Extension methods -- Object initializers -- Collection initializers -- Implicitly typed local variables -- Anonymous types -- Lambda expressions -- Functors -- Predicates -- Actions -- Putting it all together, LINQ Standard Query Operators -- Time for action - getting the LINQPad -- Restriction operators -- Where() -- Time for action - finding all names with *am* -- What just happened? -- Time for action - finding all vowels -- What just happened? -- Time for action - finding all running processes matching a Regex -- What just happened? -- Time for action - playing with the indexed version of Where() -- What just happened? -- Time for action - learn how to go about creating a Where() clause -- What just happened? -- Pop quiz - doing the thing.

Projection operators -- Select() -- Time for action - let's say "Hello" to your buddies -- What just happened? -- Making use of the overloaded indexed version of Select() -- Time for action - radio "Lucky Caller" announcement -- What just happened? -- Have a go hero - can you tell me what's going on here? -- SelectMany() -- Time for action - flattening a dictionary -- What just happened? -- Partitioning operators -- Take() -- Time for action - leaving the first few elements -- What just happened? -- TakeWhile() -- Time for action - picking conditionally -- What just happened? -- Skip() -- Time for action - skipping save looping -- What just happened? -- SkipWhile() -- Ordering operators -- Reverse() -- Time for action - reversing word-by-word -- What just happened? -- Time for action - checking whether a given string is a palindrome or not -- What just happened? -- OrderBy() -- Sorting an array of strings alphabetically -- Time for action - sorting names alphabetically -- What just happened? -- Time for action - sorting 2D points by their co-ordinates -- What just happened? -- Have a go hero - sorting Student objects -- OrderByDescending() -- ThenBy() -- Time for action - sorting a list of fruits -- What's the difference between a sequence of OrderBy().OrderBy() and OrderBy().ThenBy()? -- ThenByDescending() -- Grouping operator -- GroupBy() -- Time for action - indexing an array of strings -- What just happened? -- Time for action - grouping by length -- What just happened? -- Set operators -- Intersect() -- Time for action - finding common names from two names' lists -- What just happened? -- Union() -- Time for action - finding all names from the list, removing duplicates -- What just happened? -- Concat() -- Time for action - pulling it all together including duplicates -- Except().

Time for action - finding all names that appear mutually exclusively -- What just happened? -- Distinct() -- Time for action - removing duplicate song IDs from the list -- Conversion operators -- ToArray() -- Time for action - making sure it works! -- What just happened? -- ToList() -- Time for action - making a list out of IEnumerable -- What just happened? -- ToDictionary() -- Time for action - tagging names -- What just happened? -- ToLookup() -- Time for action - one-to-many mapping -- What just happened? -- Element operators -- First() -- Time for action - finding the first element that satisfies a condition -- What just happened? -- How First() is different from Single()? -- FirstOrDefault() -- Time for action - getting acquainted with FirstOrDefault() -- What just happened? -- Last() -- LastOrDefault() -- SequenceEquals() -- Time for action - checking whether a sequence is palindromic -- What just happened? -- ElementAt() -- Time for action - understanding ElementAt() -- What just happened? -- ElementAtOrDefault() -- DefaultIfEmpty() -- Time for action - check out DefaultIfEmpty() -- What just happened? -- Generation operators -- Range() -- Time for action - generating arithmetic progression ranges -- What just happened? -- Time for action - running a filter on a range -- What just happened? -- Repeat() -- Time for action - let's go round and round with Repeat() -- What just happened? -- Quantifier operators -- Single() -- Time for action - checking whether there is only one item matching this pattern -- What just happened? -- Pop quiz - doing the thing -- SingleOrDefault() -- Time for action - set to default if there is more than one matching elements -- Any() -- Time for action - checking Any() -- What just happened? -- All() -- Time for action - how to check whether all items match a condition -- Merging operators -- Zip().

What just happened?.
Abstract:
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. This book is aimed at beginners in Generics. It assumes some working knowledge of C# , but it isn't 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 it's the first of its kind across a framework of several collections.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: