using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int[] numbers = { 1, 3, 4, 5, 13, 89, 120, 989 };
using (BinaryWriter br = new BinaryWriter(File.Open("d:\\file.bin", FileMode.Create)))
{
foreach (int i in numbers)
{
br.Write(i);
}
}
}
}
}
/*
run:
file.bin
--------
Y x
*/