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.

适用于

另请参阅