C# FileStream ReadTimeout
Description
FileStream ReadTimeout
Gets or sets a value, in miliseconds,
that determines how long the stream will attempt to read before timing out.
Syntax
FileStream.ReadTimeout
has the following syntax.
[ComVisibleAttribute(false)]
public virtual int ReadTimeout { get; set; }
Example
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
/*from w w w.j av a 2 s. c o m*/
using System;
using System.IO;
class TestRW
{
public static void Main(String[] args)
{
FileStream s = new FileStream("MyFile.txt", FileMode.OpenOrCreate, FileAccess.Read);
Console.WriteLine(s.ReadTimeout);
}
}