Create a 1 GiB file.
string testfile = "hello"; var content = new byte[1024L * 1024 * 1024]; Random random = new Random(); random.NextBytes(content); File.WriteAllBytes(testfile, content);