Events get a little overhaul in C# 4, Afterward: Effective Events

In Parts I, II, and III, I talked about the slight changes that we made to field like events, to the += and -= event accessor operators, and how this may affect you. Just so we’re all on the same page, I want to consolidate here a list of Dos and Don’ts so you know…

16

Events get a little overhaul in C# 4, Part III: Breaking Changes

In the last two posts, I revealed that field-like events in C# 4 have a better synchronization story, and that we changed += and -= in a kind of subtle way to protect you, in many cases, from the semantic differences this introduces between C# 3 and C# 4. Now I’m here to tell you…

4

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

Events in Space

My last post was many months ago, and I’ve been pretty busy here since then. Nobody who starts a blog means to neglect it, even though mostly that’s what happens. I won’t let it go for so long again. =) Anyway, we were talking about events. Field-like events in particular, and the nastiness of their…

1

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