Export (0) Print
Expand All

FileStream.Finalize Method

Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream.

[C#] In C#, finalizers are expressed using destructor syntax.

[C++] In C++, finalizers are expressed using destructor syntax.

[Visual Basic]
Overrides Protected Sub Finalize()
[C#]
~FileStream();
[C++]
~FileStream();
[JScript]
protected override function Finalize();

Remarks

The garbage collector calls Finalize when the current object is ready to be finalized. Finalize closes the FileStream.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

FileStream Class | FileStream Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File

Show:
© 2014 Microsoft