Your own data file format? You'd just need to design a schema, and write it out.
If you mean your own exectuable format...well, that'd be harder to do I'd think. And I have no idea how you'd do that, but here's a reference to the
binary .NET assembly format - you may be able to get some ideas from there....