since it won't really buy you anything
unless your are making use of unmanaged resources.
Well it actually does give me something , variabels used inside a using
stament are out of scope as you leave the using statement
for grouping purposes this makes the code in my opinion a lot bether
readable .
also
i use a lot of data intensive resources , so with the using stament i can
write a class level table adapter use this in all my methods an get rid of
it through the idisposable pattern .
it also doesn`t hurt to implement idisposable , it just gives you some extra
coding options wich i like verry much
Michel
"Tom Shelton" <
[email protected]> schreef in bericht
Personaly i would avoid shared methods , i believe it is bether coding
practice to construct an object and dispose of it when done with it
nowadays i implement the idisposable pattern in all of my custom classes
and
use them with the using statement to make sure i am not wasting anny
resources
but as i said this is a personal opinion
Why do you implement the disposable pattern on all custom classes?
That seems a little overkill - since it won't really buy you anything
unless your are making use of unmanaged resources.