James,
You can always register for the Disposed event. This event is called
only when the Dispose method is called, not when an object is finalized.
You can call Dispose on your resources there.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"JamesB" <Ja****@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
I have been migrating my code from .NET 1.1 framework to .NET 2.0
framework.
With the designer generated code, the Dispose() method is put in the
<Name>.Designer.cs partial class.
How is it possible to add resource cleanup code to a user control/form (as
I
used to do in the Dispose() method before partial classes)?
Many thanks.