Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Stream.ReadTimeout Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)]
public virtual int ReadTimeout { get; set; }

Property Value

Type: System.Int32

A value, in miliseconds, that determines how long the stream will attempt to read before timing out.

Exception Condition
InvalidOperationException

The ReadTimeout method always throws an InvalidOperationException.

Notes to Inheritors:

The ReadTimeout property should be overridden to provide the appropriate behavior for the stream. If the stream does not support timing out, this property should raise an InvalidOperationException.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: