Writing a custom file type

custom file type , file type , file header , file type header United States
  • 10 years ago

    First off, let me say that I know how to set up the system so that my program will open the selected file. That given, I have a question, probably a dumb one, but a question. When you open an exe or a zip file in notepad, you nottice at the beginning of the file that there are letters saying what type of file this is, zip is PK and exe is MZ. I know that this is part of the headers. Is there a way to do this also while serializing an object or will I have to edit the file separately from the serializer? I want to do this so that the app will be able to determine if it can open the file by looking at the first byte or two. Thank you.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Never trust a programmer in a suit.” - Anonymous