Stream.ReadTimeout Stream.ReadTimeout Stream.ReadTimeout Stream.ReadTimeout Property

定义

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

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

属性值

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

异常

继承者说明

ReadTimeout应重写属性,以提供适当的行为的流。The ReadTimeout 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.

适用于