Stream.CanTimeout Stream.CanTimeout Stream.CanTimeout Stream.CanTimeout Property

定義

取得值,該值判斷目前的資料流是否可以逾時。Gets a value that determines whether the current stream can time out.

public:
 virtual property bool CanTimeout { bool get(); };
[System.Runtime.InteropServices.ComVisible(false)]
public virtual bool CanTimeout { get; }
member this.CanTimeout : bool
Public Overridable ReadOnly Property CanTimeout As Boolean

屬性值

值,判斷目前的資料流是否可以逾時。A value that determines whether the current stream can time out.

備註

CanTimeout 屬性一定會傳回 falseThe CanTimeout property always returns false. 某些資料流實作需要不同的行為,例如NetworkStream,如果網路連線中斷或遺失的逾時。Some stream implementations require different behavior, such as NetworkStream, which times out if network connectivity is interrupted or lost. 如果您要實作必須能夠逾時時間的資料流,這個屬性應該覆寫來傳回trueIf you are implementing a stream that must be able to time out, this property should be overridden to return true.

適用於

另請參閱