Colleagues,
I wouldn't ask this question here, but the description on the MS docs' pages for both looks vague to this humble one:
from what I read, I do not see much difference, especially when it's
"Closes the StreamReader object and the underlying stream, and releases any system resources associated with the reader" (and
"Closes the underlying stream, releases the unmanaged resources used by the StreamReader, and optionally releases the managed resources", that latter if the Boolean parameter = True...
To simplify the matter:
Is issuing
enough to release all the resources, or
it's better be
or
even just
would be enough?
Please advise.
Regards,
Ilya
I wouldn't ask this question here, but the description on the MS docs' pages for both looks vague to this humble one:
from what I read, I do not see much difference, especially when it's
"Closes the StreamReader object and the underlying stream, and releases any system resources associated with the reader" (and
"Closes the underlying stream, releases the unmanaged resources used by the StreamReader, and optionally releases the managed resources", that latter if the Boolean parameter = True...
To simplify the matter:
Is issuing
Code:
StreamReader.Close()
it's better be
Code:
StreamReader.Close()
StreamReader.Dispose()
or
even just
Code:
StreamReader.Dispose(True)
Please advise.
Regards,
Ilya