3 ms·
"dispose" sample in the blog is a wrong sample. IDisposable is a contract, and if someone define this contract, is because this contract should be used. the fac
by D_Guidi 9y ago
"dispose" sample in the blog is a wrong sample.
IDisposable is a contract, and if someone define this contract, is because this contract should be used.
the fact that the actual implementation is "empty" doesn't mean that this remains true in the future, or in another implementation of the same interface.
so, based on the sample, I can say: don't read the source!
- default-kramer 9y agoI just wrote a similar comment but I think yours is better. "Contract" is a great word to use here.
- mattmanser 9y agoYAGNI. Just like the author found out, it's been there years, no-one's used it.