Just a quick question on implementing the Dispose pattern.

The .NET Framework SDK documentation states that an ObjectDisposedException
should be thrown from instance methods (other than Dispose) when resources
for the object have already been disposed. This would include any
non-shared property procedures as well, right? Seems logical. Just looking
for verification.

Thanks!

Re: Dispose Question by Richard

Richard
Mon Nov 22 11:46:57 CST 2004

I had a discussion with one of the CLR devs on his blog about this and he said in effect "well mostly"

What about a property called IsClosed or a an operator overload? I think there is a broad approach that what the documentation says is correct however there are exceptions (aren't there always)

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Just a quick question on implementing the Dispose pattern.

The .NET Framework SDK documentation states that an ObjectDisposedException
should be thrown from instance methods (other than Dispose) when resources
for the object have already been disposed. This would include any
non-shared property procedures as well, right? Seems logical. Just looking
for verification.

Thanks!