Events get a little overhaul in C# 4, Part II: Semantic Changes and +=/-=

Last time, we saw that the field-like event accessor code that the C# compiler emits has changed. And it’s better in a few ways because we’ve banished the locking code that we used to emit. There are a few questions that came up in the comments, and two of them in particular are probably as…

39

Events get a little overhaul in C# 4, Part I: Locks

It’s been a long time since I’ve posted anything about the way the compiler generates field-like events, and I have some good news. We fixed them! Well, anyway, we changed them, and I believe that in C# 4, they are better than they used to be. Read this old post to refresh yourself, if you…

9

Field-like Events Considered Harmful

Hi all, my name’s Chris Burrows, and I’m a developer on the C# Compiler team here in Redmond. I’ll introduce myself further in a subsequent post, but I just want to start off with a note that has at least a little substance. So let’s talk about C# events as they’ve existed for a long…

0