Is there any nice pattern in .Net for ensuring that IDisposable fields owned by an object will get disposed if an exception is thrown during construction, possi
In C# you would use 'using':
using(DisposableObject obj = new DisposableObject()) {
}
VB also has a Using...End Using construct. When using these the Dispose method is guaranteed to be called, even in the event of an exception. You can release any resources created by the initializers (or the constructor) in the Dispose method.