System.IO.FileInfo.OpenWrite C# (CSharp) Method

OpenWrite() public method

public OpenWrite ( ) : System.IO.FileStream
return System.IO.FileStream
        public System.IO.FileStream OpenWrite() { throw null; }
        public System.IO.FileInfo Replace(string destinationFileName, string destinationBackupFileName) { throw null; }

Same methods

FileInfo::OpenWrite ( ) : FileStream

Usage Example

Example #1
0
 public void Store ()
 {
     Properties props = new Properties();
     props.Add ("foo", "this");
     props.Add ("bar", "is");
     props.Add ("baz", "it");
     FileInfo file = new FileInfo ("properties.test");
     try 
     {
         // write 'em out with the specified header...
         using (Stream cout = file.OpenWrite ()) 
         {
             props.Store (cout, "My Properties");
         }
     }
     finally 
     {
         try 
         {
             file.Delete ();
         } 
         catch (IOException)
         {
         }
     }
 }
All Usage Examples Of System.IO.FileInfo::OpenWrite