views:

280

answers:

1

Does anyone know the correct method for writing a destructor for an XBAP application?

+5  A: 

XBAP applications are managed WPF applications that run in a browser and hence shouldn't support deterministic cleanup.. aka destruction. The Dispose pattern is the answer for any cleanup that needs to be explicitly performed.

Or if just wanted to run some code just before shutdown... look at the Application class, which exposes life-time methods/events like OnExit/Exit.

Gishu