Create FileStream from FileInfo for writing : FileInfo : File Directory Stream C# Examples


C# Examples » File Directory Stream » FileInfo »

 

Create FileStream from FileInfo for writing









    
using  System;
using  System.IO;

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

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

        byte  MyWriteByte  =  100;

        MyFileStream1.WriteByte(MyWriteByte);
        
        MyFileStream1.Close();        
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» FileInfo