Edd February 2016

Reasons to use Close over Dispose for a Stream?

Is there ever a valid reason to use the Close method on a stream instead of Dispose?

Answers


Idle Crow February 2016

Only in System.Windows.Forms.Form and System.Data.SqlClient.SQLConnectoin do Close and Dispose have different behavior. This has to do with dispose being hidden in situations where the behavior was not clear in context. This is more deeply explained here MSDN Difference Between Close and Dispose

Post Status

Asked in February 2016
Viewed 2,017 times
Voted 5
Answered 1 times

Search




Leave an answer