Events play a crucial role in .NET. They are used throughout the framework to provide notification to components about different activities that are occurring. For example, any time you click a Button control in an ASP.NET or Windows Forms application a click event is fired that can then be captured and handled. Although an end user can cause an event to be raised, in many cases events are raised by the .NET application itself.

This sample application shows how DOM events exposed by the XmlDocument class can be leveraged to provide logging capabilities that track changes, insertions, or deletions to an XML document.