Skip to content
0:00 / 0:00

#c##jonskeet

Abusing C# - Jon Skeet

NDC Conferences

230K subscribers • 110 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Jon Skeet

Advanced. Deep dive for people who know the field.

135K views9 years ago2 recommendations

Programming languagesC# and .NETLanguage design and type systems

Jon Skeet explores the dark corners of C#, demonstrating how to twist language features into unintended and horrifying shapes.

What language could be complete without some horrible abuse? If you can't do terrible, evil things with it, how could you ever create works of great art? Of course, anyone can write plain bad code. The trick for really evil code is to make it attractive; to make it seduce you with it utility, brevity and general glamour. Pierce that attractive exterior though, and the horrors are revealed, twisting language features into shapes they were never intended to take. As C# has evolves as a language, as its feature surface expands, new crevices can be found, containing as-yet unseen terrors. Join me for a whimsical look at code you should never put into production... NDC Conferences ndc-london.com ndcconferences.com

Why it's here

2 people recommend this

What people say. Recommended as an entertaining and educational look at the weird quirks and edge cases of C#.

u/BigOnLognin r/dotnet • Recommends

On “StringBuilder the trick you didn't know”

That's an interesting quirk of StringBuilder. I'm actually quite horrified that Length is a getter AND setter. Jon Skeet has a nice link to this video about all the weird things possible with (and weird ways to break) C#. But, as someone who has to read and fix code like this on a daily basis, no one should ever do this. This post's title should be: Look at this weird thing StringBuilder can do. DO NOT DO THIS, EVER! Just use `string.Join` or `FormUrlEncodedContent` (if you're building a query string). It's easier to reason about and you don't need to know the internals of StringBuilder to understand.

u/Aaron64Lolin r/dotnet • Recommends

On “Why is the .Net job market so huge but the online presence is not?”

You may be judging the community by the wrong metric. Microsoft's documentation is excellent and extensive. I use stackoverflow less than once a week (and only as a last resort). I never use online guides (outside of MSDN). The C# youtube videos I watch are more like this: link to this video than any sort of guide. I'm on this subreddit while taking a break, I wouldn't come here to solve a problem. There's a streak of individualism I've noticed in the c# community. It's a builder's language (as opposed to an integrator's language), so a core skill that other c# developers push you to grow (at least in my circles) is the ability to build whatever you want using only what Microsoft provides and your…