NonSerialized events

Visual Basic 2010 introduces a new feature known as NonSerialized Events. Basically you can now decorate an event with the NonSerialized attribute in custom serialization. A common scenario for applying this technique is when you work on classes that implement the INotifyPropertyChanged interface because it is more important serializing data and not an event that just notifies the user interface of changes on data. The following code shows an example about NonSerialized events inside a class that implements INotifyPropertyChanged:

image

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.