Exploring C# 6 with Jon Skeet

Sit in on some live coding sessions with Jon Skeet of StackOverflow.com fame as he shows off some of the new features of C# 6.
Course info
Rating
(474)
Level
Intermediate
Updated
Dec 2, 2015
Duration
3h 21m
Table of contents
Description
Course info
Rating
(474)
Level
Intermediate
Updated
Dec 2, 2015
Duration
3h 21m
Description

Jon Skeet of Stackoverflow.com fame joins Rob Conery to drill into some of the new features of C# 6. Along the way he'll discuss past versions of C# and give interesting examples of how to use some of the new features.

About the author
About the author

Rob Conery co-founded Tekpub and created This Developer's Life. He is an author, speaker, and sometimes a little bit opinionated.

More from the author
PostgreSQL Playbook for Developer DBAs
Intermediate
2h 35m
Apr 5, 2016
Electron Playbook
Intermediate
1h 38m
Mar 2, 2016
More courses by Rob Conery
Section Introduction Transcripts
Section Introduction Transcripts

Introduction
Welcome to Exploring C# 6 with Jon Skeet here at Pluralsight. My name's Rob Conery, and I'll be the host of this course. And I wanted to take a second before we got going so that you would be familiar with what you're about to see because this is unlike a typical course that you would find here at Pluralsight in terms of structure, in terms of focus. The reason, quite simply, is because it's Jon. Jon is probably, outside of Microsoft, one of the most knowledgeable people about C# in the entire world. So when he starts talking about a concept, he doesn't just stay on C# 6, for instance. He'll go all the way back to C# 2, maybe jump into 3, 4. 5, 5 all to just build up what he's trying to explain. He'll show the history of a concept, and then carry it all the way through to C# 6, and the next thing you know you're riding a WAM, which he does by the way. Anyway, I felt letting the conversation wander was a really good idea because Jon is full of fascinating ideas and topics and nuggets of knowledge, and I figured you'd like that. So, we have an outline. We have a pretty good structure. We kept to that outline pretty well, but we did tend to wander. So if you're watching this video and thinking why are we going back to. NET 2 and C# 3, etc. , well Jon likes to build a case, and sometimes he takes his time doing it, which I think is great. I had a ton of fun putting this course together. Jon is a fascinating and wonderful man. I hope you enjoy it too.

Using Nameof
Okay, so in this module we're going to talk about the nameof feature. Again, a new feature to C# 6, slightly similar to CallerMemberInfo from C# 5, but a bit more flexible. So, this is a feature that we have wanted, or many people have wanted in C# for quite a long time. There's a fairly famous blog post from Eric Lippert from quite a while ago called In Foof We Trust where there was possibly going to be a much described feature called infoof, otherwise known as info of, where you might be able to do something like PropertyInfo property = infoof, so infoof, you see, so infoof Name, for example. So this would be just like we've got typeof Person. This would just be a more general get me the info of. So, that's the sort of history of where we were going, but we didn't end up quite there for C# 6. We've got a slightly smaller feature because all of these things, the bigger and more powerful the feature, the harder it is to nail down in the specification, the harder it is to implement, test all these kind of things. So, that's just the background behind it, but let's see what we have got and what we can use it for.