C#/.NET - Custom Binary File Formats - Where to Start?

前端 未结 5 1846
日久生厌
日久生厌 2021-02-03 13:33

I need to be able to store some data in a custom binary file format. I\'ve never designed my own file format before. It needs to be a friendly format for traveling between the C

5条回答
  •  北海茫月
    2021-02-03 13:59

    It depends on what type of data you will be writing in to the binary file and what is the purpose of the binary file. Are they class object or just record data? If it is record data i would recommend to put it in xml format. That way you can include an schema validation to validate that the file conforms with you standards. There are tools in both java and .NET to import and export data from / to xml format.

提交回复
热议问题