DeflateStream.EndWrite Method
Assembly: System (in system.dll)
| Exception type | Condition |
|---|---|
| asyncResult is a null reference (Nothing in Visual Basic). | |
| asyncResult did not originate from a BeginWrite method on the current stream. |
EndWrite must be called only once for every call to the BeginWrite method.
This method blocks until the I/O operation has completed. Errors that occur during an asynchronous write request, such as a disk failure during the I/O request, occur on the thread pool thread and become visible upon a call to EndWrite. Exceptions thrown by the thread pool thread will not be visible when calling EndWrite.
The following code example shows how to use the DeflateStream class to compress and decompress a file.
IO.Compression.Deflate1#1
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.