Sadly, this code crashes my ArcMap. In particular, line 28:
Events.SelectionChanged += Events_SelectionChanged;
doesn't allow ArcMap to start and instead displays a dialogue with "ArcGIS Desktop has encountered a serious application error and is unable to continue."
Changing the code to
((IActiveViewEvents_Event)ArcMap.Document.ActiveView).SelectionChanged += delegate() {
MessageBox.Show("Selection Changed");
};
results in the same error.
I am running ArcGIS Desktop 10.1 and matching Arcobjects .NET SDK.