Stream.WriteTimeout 属性

定义

获取或设置一个值(以毫秒为单位),该值确定流在超时前将尝试写入多长时间。Gets or sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.

public:
 virtual property int WriteTimeout { int get(); void set(int value); };
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int WriteTimeout { get; set; }
member this.WriteTimeout : int with get, set
Public Overridable Property WriteTimeout As Integer

属性值

一个确定流在超时前将尝试写入多长时间的值(以毫秒为单位)。A value, in milliseconds, that determines how long the stream will attempt to write before timing out.

属性

异常

继承者说明

应重写 WriteTimeout 属性,以便为流提供适当的行为。The WriteTimeout property should be overridden to provide the appropriate behavior for the stream. 如果流不支持超时,则此属性应引发 InvalidOperationExceptionIf the stream does not support timing out, this property should raise an InvalidOperationException.

适用于