.NET Puzzles, Gotchas & Cautionary Tales

Puzzles, gotchas and cautionary tales to frighten and inspire you! Puzzles are “unit tests” that will remind you of things you’ve forgotten, teach you things you didn’t know and make you a more robust programmer.
Course info
Rating
(207)
Level
Intermediate
Updated
Jul 30, 2013
Duration
2h 23m
Table of contents
Introduction
Intrinsic Types
Methods and Overloads
Collections
Type Design
Description
Course info
Rating
(207)
Level
Intermediate
Updated
Jul 30, 2013
Duration
2h 23m
Description

Puzzles, gotchas and cautionary tales to frighten and inspire you! Puzzles are “unit tests” that pose a problem many good .NET programmers can’t answer. Pull out Visual Studio and explore, or go straight on to the next clip where you’ll learn why the .NET framework, C#, and Visual Basic behave that way. Regardless of your current skills, you’ll remember things you’ve forgotten, learn things you didn’t know and become a more robust programmer.

About the author
About the author

Kathleen Dollard is a .NET Team Coach, has been a Microsoft MVP since 1998, and is an ASP.NET Insider.

More from the author
Play by Play: Visual Studio 2017 and C# 7
Intermediate
2h 34m
Aug 25, 2017
Visual Studio 2015 Playbook
Intermediate
2h 43m
Oct 17, 2016
More courses by Kathleen Dollard
Section Introduction Transcripts
Section Introduction Transcripts

Intrinsic Types
Hi, I'm Kathleen Dollard and this module is part of the course. NET Puzzles, Gotchas & Cautionary Tales. This module contains some fun puzzles about intrinsic types; such as, integers, floating point numbers and string. And also contains a couple bonus clips about fractional data types working with doubles, singles and decimal types.

Methods and Overloads
Hi, I'm Kathleen Dollard, and this module is part of the course. NET Puzzles, Gotchas, and Cautionary Tales. This module contains some puzzles about methods and their parameters. Many of these puzzles involve overloading, because it's one of the trickier aspect of method calls. There's also a couple of bonus clips on overloading and parameters. The benefit of overloads are pretty obvious, you can experience the same thing with different incoming information. Overloads allow you to model this directly with all the versions having the same name. This simplifies IntelliSense and removes the need for creative naming. Overloads is one of two approaches to default parameters. When primitive stacked based types are passed as objects, they have to be boxed. Boxing requires copying the value from the stack to the heap and creating a new pointer to it. All access then requires a double hop. And the value might need to be returned to the stack, requiring another copy regardless of whether the value was used later. Once the method is done with the boxed object, it's abandoned on the heap, requiring garbage collection to later clean it up. It's actually a tad messier than that, but you can see measurable performance improvements with type specific overloads on frequently called methods.

Collections
I'm Kathleen Dollard. And this module is part of course,. NET Puzzles, Gotchas & Cautionary Tales. This module contains some puzzles about collections. Collections are groups, such as, arrays, lists, collections, and sets.

Type Design
Hi, I'm Kathleen Dollard. And this module is part of the course. NET Puzzles, Gotchas and Cautionary Tales. This module contains some puzzles about type design. It also contains a couple of bonus clips. I'll start with a couple of short puzzles on sometimes forgotten scope details.