Create StreamWriter from FileInfo : FileInfo : File Directory Stream C# Examples


C# Examples » File Directory Stream » FileInfo »

 

Create StreamWriter from FileInfo









    
using  System;
using  System.IO;

public  class  MainClass
{
    static  void  Main(string[]  args)
    {
        FileInfo  MyFile  =  new  FileInfo(@"c:\Testing.txt");
        StreamWriter  MyStreamWriter  =  MyFile.CreateText();

        MyStreamWriter.Write("a  string");

        MyStreamWriter.Close();
        
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» FileInfo