1

Possible Duplicate:
How to correctly unregister an event handler

If I have registered an event as following

List.Changed += new ChangedEventHandler(ListChanged);

what should be the best way of de registering it in destructor

List.Changed -= new ChangedEventHandler(ListChanged);

or

List.Changed -=ListChanged;
Community
  • 1
  • 1
Ram
  • 11,404
  • 15
  • 62
  • 93

2 Answers2

1

the second option is just shorthand

Rob Fonseca-Ensor
  • 15,510
  • 44
  • 57
0

The second option. And you can subscribe to it the same way:

List.Changed += ListChanged;
Jamie Ide
  • 48,427
  • 16
  • 81
  • 117