Create FileStream from FileInfo for reading : FileInfo « File Directory Stream « C# / CSharp Tutorial






using System;
using System.IO;

public class MainClass
{
  static void Main(string[] args)
  {

    FileInfo MyFiles = new FileInfo(@"c:\Testing.txt");
    FileStream MyFileStream1 = MyFiles.OpenRead();

    int MyBytes = MyFileStream1.ReadByte();

    MyFileStream1.Close();    
  }
}








15.13.FileInfo
15.13.1.Open an existing file and return a FileStream
15.13.2.Create StreamWriter from FileInfo
15.13.3.Create FileStream from FileInfo for writing
15.13.4.Create FileStream from FileInfo for reading
15.13.5.File Sorter
15.13.6.Show info on image types