Stream.Dispose Method (Boolean)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Protected Overridable Sub Dispose ( _ disposing As Boolean _ )
protected virtual void Dispose( bool disposing )
true to release both managed and unmanaged resources; false to release only unmanaged resources.
You should release all resources by specifying true for disposing. When disposing is true, the stream can also ensure data is flushed to the underlying buffer, and access other finalizable objects. This may not be possible when called from a finalizer due a lack of ordering among finalizers.
Notes to Inheritors
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Supported in: Xbox 360, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.