FileInfo.OpenWrite() : FileInfo « System.IO « C# / C Sharp by API






FileInfo.OpenWrite()

 

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();    
  }
}

   
  








Related examples in the same category

1.new FileInfo(String fileName)
2.FileInfo.Attributes
3.FileInfo.Create()
4.FileInfo.CreationTime
5.FileInfo.CopyTo(String fileName)
6.FileInfo.Delete
7.FileInfo.Directory
8.FileInfo.FullName
9.FileInfo.LastAccessTime
10.FileInfo.MoveTo(String path)
11.FileInfo.Open
12.FileInfo.OpenRead
13.FileInfo.OpenText