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); };
public virtual int ReadTimeout { get; set; }
[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.

適用於