Does streamreader dispose automatically after out of scope
Answers
Answered by
0
It's safe to ignore it in this case. Or you can just create the stream in the constructor call to StreamReader. The warning looks bogus to me, given that the docs for IDisposable.Dispose explicitly state: "If an object's Dispose method is called more than once, the object must ignore all calls after the first one. The object must not throw an exception if its Dispose method is called multiple times."
Answered by
1
Nope it doesn't
You see the thing here is that I don't understand so I can't tell whether it dispose or not.
Hope it doesn't help
Similar questions
English,
8 months ago
Environmental Sciences,
8 months ago
Math,
8 months ago
Physics,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago