using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
// Create a file of size 2 GB instantaneously (for testing purposes)
FileStream fs = new FileStream(@"D:\huge_dummy_file", FileMode.CreateNew);
fs.Seek(2048L * 1024 * 1024, SeekOrigin.Begin);
fs.WriteByte(0);
fs.Close();
}
}
}
Create a 2GB file instantaneously : C#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment