閱讀英文版本 編輯

分享方式:


WebClient.WriteStreamClosed Event

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Caution

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Occurs when an asynchronous operation to write data to a resource using a write stream is closed.

C#
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public event System.Net.WriteStreamClosedEventHandler? WriteStreamClosed;
C#
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public event System.Net.WriteStreamClosedEventHandler WriteStreamClosed;

Event Type

Attributes

Remarks

注意

WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete, and you shouldn't use them for new development. Use HttpClient instead.

This event is raised each time an asynchronous operation used to write data to a resource using a write stream is closed. These operations result from calls to the OpenWriteTaskAsync methods.

The WriteStreamClosedEventHandler is the delegate for this event. The WriteStreamClosedEventArgs class provides the event handler with event data.

For more information about how to handle events, see Handling and Raising Events.

Applies to

產品 版本 (已過時)
.NET (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10)
.NET Framework (4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)