Create a gist now

Instantly share code, notes, and snippets.

random file generation
FileStream sw = new FileStream("file.txt", FileMode.Create);
sw.Seek(1024, SeekOrigin.Begin);
sw.WriteByte(0);
sw.Close();
@pysiak
pysiak commented Jul 24, 2014
using System.IO;
public class Example
{
    public static void Main()
    {
        FileStream sw = new FileStream("file.txt", FileMode.Create);
        sw.Seek(1024, SeekOrigin.Begin);
        sw.WriteByte(0);
        sw.Close();
        return;
    }
}

Hi, just following from stackoverlow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment