using System;
using System.IO;
public class MainClass
{
static void Main(string[] args)
{
FileStream MyFileStream = new FileStream(@"c:\Testing.txt", FileMode.CreateNew, FileAccess.Write, FileShare.None);
StreamWriter MyStreamWriter = new StreamWriter(MyFileStream);
MyStreamWriter.Write("a string");
MyFileStream.Close();
MyStreamWriter.Close();
}
}
|