Stream.ReadTimeout 属性
定义
获取或设置一个值(以毫秒为单位),该值确定流在超时前尝试读取多长时间。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 方法总是引发 InvalidOperationException。The ReadTimeout method always throws an InvalidOperationException.
继承者说明
应重写属性以提供流的适当行为。 ReadTimeoutThe ReadTimeout property should be overridden to provide the appropriate behavior for the stream. 如果流不支持超时,则此属性应引发InvalidOperationException。If the stream does not support timing out, this property should raise an InvalidOperationException.