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.