-
[C#]File Pumper Source
Written by me, pumps files with bytes. Enjoy!
PHP Code:
public void FilePump(string filepath,int amountofbytes)
{
if (filepath == "")
{
MessageBox.Show("You need a file to pump .-.");
}
else
{
var file = System.IO.File.OpenWrite(filepath);
int ii;
ii = 0;
while (ii < amountofbytes)
{
file.WriteByte(1);
ii = ii + 1;
}
MessageBox.Show("Done pumping sir.");
}
}
-
PHP Code:
using System.IO;
Learn to use using's. They help out and save lines of coding.
-
Lol sorry bro. I have that in my code, just didnt wanna make people have a difficult time.
-
PHP Code:
int ii;
ii = 0;
can just be
PHP Code:
if (filepath == null)
{
MessageBox.Show("You need a file to pump .-.");
}
Fixed.