using System; using System.IO; namespace zeroes { class zeroes { static void Main(string[] args) { String filename = "_ZEROES.BIN"; String drive = Directory.GetCurrentDirectory().Substring(0, 1); byte[] zeros = new byte[10 * 1024 * 1024]; Array.Clear(zeros, 0, zeros.Length); FileStream file = new FileStream( filename, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, zeros.Length, FileOptions.WriteThrough); while (new DriveInfo(drive).AvailableFreeSpace > zeros.Length) file.Write(zeros, 0, zeros.Length); file.Close(); File.Delete(filename); } } }