Home > Store > Programming > Windows Programming

C# Puzzlers (Video Training)

Add To My Wish List

  • Copyright 2012
  • Edition: 1st
  • Downloadable Video
  • ISBN-10: 0-13-275698-6
  • ISBN-13: 978-0-13-275698-3

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Sample Content

How well do you know C#?  Put your knowledge to the test with Bill Wagner’s C# Puzzlers video LiveLesson!

 

Bill Wagner’s C# Puzzlers exposes common misconceptions that can occur when developers are unclear about how language features interact or lack understanding about how a single features works.  Using the fun “Puzzler” format, Bill demonstrates these misconceptions via screencasts using small code samples.  He gives you an opportunity to  figure it out first, and then explores different ways to modify the code until its behavior is correct.

 

This collection of Puzzlers is divided into seven sections. Each section delves into the rules that govern the aspects of the C# language that developers find most confusing: 

 

I.             Generics

II.            Method Resolution

III.           Named and Optional Parameters

IV.          LINQ

V.            Value and Reference Semantics

VI.          Dynamic Programming in C#

 

Table of Contents

The introductory Puzzler introduces the format using a puzzle, and discusses some of the nuances of object construction.

 

I.         Generics

Generics are still one of the most important aspects of the .NET environment and the C# language. So many of the features we use every day are built upon generics in one way or another. Generics are still a complicated feature. You must create code whose types are not known until runtime. The compiler must generate IL with minimal information about the actual types that will be represented by the type parameters.  The JIT must convert that IL into executable code and plug in the real types for the type parameters. Finally, the meta data carried along must include information that enables reflection and other advanced techniques to work correctly.

 

Puzzle 1 - Operations on Generic Type Parameters

 What information gets conveyed, and what information cannot get used when a real type is substituted for a type parameter?

Puzzle 2 - Generics and Specializations

What happens when you create overloads for generic methods?

Puzzle 3 - Generics and Variance

How do generics and arrays differ with respect to variance?

Puzzle 4 - Generics, Constraints and Overloads

How does the compile choose between different candidate generic methods?

 

II.        Method Resolution

The rules that govern method resolution in C# are necessarily complex. The features the community has asked for and the team has implemented have only added more complexity to those rules with each new release of the C# language. If you want to be a strong C# developer, you need to have at least a working knowledge of these rules.

 

Puzzle 5 - Overloading base class methods

What happens when derived classes create overloads of base class methods?

Puzzle 6 - Overloaded methods and null parameters

How does the compiler resolve overloaded methods when you use null parameters?

Puzzle 7 - Overloaded methods and null parameters revisited

What if the overloaded parameter types are unrelated?

Puzzle 8 - Overloaded methods and null parameters and Generics

What if one of the methods is generic?

 

III.      Named and Optional Parameters

Named and optional parameters sound so simple at first examination. But this feature has significant implications on other features in the language. It also has significant implications on areas as fundamental as how parameters are passed to called methods.

 

Puzzle 9 - Optional parameters and constructors

When is a default constructor not a default constructor?

Puzzle 10 - Optional Parameters and Overloads

Which is the better match?

Puzzle 11- Evaluation of Named Parameters

When do parameters get evaluated? Why does it matter?

 

IV.      LINQ

LINQ introduced totally new ways of constructing and organizing programs. There were new rules related to how you wrote algorithms.  Those rules still cause developers confusion in some cases.

Puzzle 12 - Bound Variables

When are LINQ queries evaluated?

Puzzle 13 - Method calls in LINQ queries

How does LINQ process expressions and method calls?

 

V.        Value and Reference Semantics

Reference types and value types behave differently in many important ways. They also behave the same in many other ways. It can be difficult to keep those differences in mind as you get too accustomed to the similarities.

 

Puzzle 14 - Value type Semantics

When does copying values hurt?

Puzzle 15 - Value types and events

What happens when value types receive event notifications?

 

VI.      Dynamic Programming in C#

Dynamic extensions move many of the common tasks that were performed by the compiler to runtime libraries. The interplay between static and dynamic typing creates new complications in C# programs.  This section discusses some of the most common ways where static and dynamic types interact in ways that can be surprising.

Puzzle 16 - Dynamic Types and Extension Methods

How do dynamic types interact with extension methods?

Puzzle 17 - Anonymous types and Dynamic Methods

Under what conditions can anonymous types be treated dynamically?

Puzzle 18- Creating Dynamic Types in C#

Why would you pick different ways to implement dynamic types?

DRM-Free Video Downloads. Purchase and immediately download individual lessons from this video. Make your lesson selections below and click on the Buy button.

Videos can be viewed on: Windows 8, Windows XP, Vista, 7, and all versions of Macintosh OS X including the iPad, and other platforms that support the industry standard h.264 video codec.

Lesson 1

Introduction to Puzzle Construction Order and General Puzzle Format

In 2010 Bill Wagner gave a series of C# Puzzlers presentations at a number of U.S. based user groups and CodeMash events.  All were put to the test with intermediate level developers who tried to break, workaround, and outsmart the code.  Bill's puzzlers were so well received, that he is now being regularly asked to present them.  With each talk he acquires more thought provoking range of questions for the audience. This series of videos addresses many of those puzzling questions.  The focus is on C# 4.0 and each Puzzler will take about 15-20 minutes. Each puzzle will show a reasonably small piece of code and then ask readers to guess what the code does. The author will show what the code does, and why many developers believe it would behave differently. Then, he'll discuss how you could write the code differently to accomplish the same result without the misconceptions.

Duration: 00:09:38  File Size: 14MB

View exampleView example
$2.99

Lesson 2

Puzzle 1: Operations on Generic Type Parameters

 Puzzle 1 teaches the concepts of what information gets conveyed, and what information cannot get used when a real type is substituted for a type parameter.

Duration: 00:14:33  File Size: 21MB

View exampleView example
$2.99

Lesson 3

Puzzle 2: Generics and Specialization

Puzzle 2 shows happens when you create overloads for generic methods.

Duration: 00:07:26  File Size: 12MB

View exampleView example
$2.99

Lesson 4

Puzzle 3: Generics and Variance

Puzzle 3 teaches how generics and arrays differ with respect to variance.

Duration: 00:10:07  File Size: 19MB

View exampleView example
$2.99

Lesson 5

Puzzle 4: Generics, Constraints, and Overloads

Puzzle 4 teaches how the compile chooses between different candidate generic methods.

Duration: 00:10:15  File Size: 19MB

View exampleView example
$2.99

Lesson 6

Puzzle 5: Overloading Base Class Methods

Puzzle 5 teaches what happens when derived classes create overloads of base class methods.

Duration: 00:07:01  File Size: 12MB

View exampleView example
$2.99

Lesson 7

Puzzle 6: Overloading Methods and Null Parameters

Puzzle 6 teaches how the compiler resolves overloaded methods when using null parameters.

Duration: 00:06:05  File Size: 10MB

View exampleView example
$2.99

Lesson 8

Puzzle 7: Overloading Methods and Null Parameters Revisited

Puzzle 7 addresses the question "What if the overloaded parameter types are unrelated?"

Duration: 00:05:53  File Size: 10MB

View exampleView example
$2.99

Lesson 9

Puzzle 8: Overloading Methods and Null Parameters and Generics

Puzzle 8 address What if one of the methods is generic?

Duration: 00:04:38  File Size: 8MB

View exampleView example
$2.99

Lesson 10

Puzzle 9: Optional Parameters and Constructors

Lesson 9 teaches the concept of "When is a default constructor not a default constructor"?

Duration: 00:06:15  File Size: 11MB

View exampleView example
$2.99

Lesson 11

Puzzle 10: Default Parameters and Overrides

Lesson 10 is on evaluations of named parameters; which is the better match?

Duration: 00:04:33  File Size: 8MB

View exampleView example
$2.99

Lesson 12

Puzzle 11: Evaluation of Named Parameters

Puzzle 11 covers when do parameters get evaluated and teaches why it matters.

Duration: 00:07:20  File Size: 14MB

View exampleView example
$2.99

Lesson 13

Puzzle 12: Bound Variables

Puzzle 12 addresses "When are LINQ queries evaluated?"

Duration: 00:09:11  File Size: 16MB

View exampleView example
$2.99

Lesson 14

Puzzle 13: Method Calls in LINQ Queries

Puzzle 13 teaches "How does LINQ process expressions and method calls?"

Duration: 00:10:46  File Size: 19MB

View exampleView example
$2.99

Lesson 15

Puzzle 14: Value Type Semantics

Puzzle 14 addresses when copying values hurt.

Duration: 00:06:18  File Size: 12MB

View exampleView example
$2.99

Lesson 16

Puzzle 15: Value Types and Event Handlers

Puzzle 15 addresses what happens when value types receive event notifications.

Duration: 00:07:04  File Size: 12MB

View exampleView example
$2.99

Lesson 17

Puzzle 16: Dynamic Types and Extension Methods

Puzzle 16 teaches how dynamic types interact with extension methods.

Duration: 00:06:47  File Size: 12MB

View exampleView example
$2.99

Lesson 18

Puzzle 17: Anonymous Types and Dynamic Methods

Puzzle 17 answers the question "Under what conditions can anonymous types be treated dynamically?"

Duration: 00:05:26  File Size: 9MB

View exampleView example
$2.99

Lesson 19

Puzzle 18: Creating Dynamic C# Types

Puzzle 18 asks why would you pick different ways to implement dynamic types?

Duration: 00:09:46  File Size: 21MB

View exampleView example
$2.99

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

Actual product comes full screen and in high resolution.

 
Buy

Downloadable Video  $69.99  $55.99

About this video

Accessible from your Account page after purchase. Requires the free QuickTime Player software.

Videos can be viewed on: Windows 8, Windows XP, Vista, 7, and all versions of Macintosh OS X including the iPad, and other platforms that support the industry standard h.264 video codec.

Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.

Save 35% on Video LiveLessons with coupon VIDEO35