Reading custom format files in C #

I would like to get n bytes from a specific location in a file in my specific data structure (structure).

The old C application (which we ported) uses fseek () and fread ().

Where is the comparable solution in C # /. Net, without using Win32-API?

+3
source share
2 answers

I would use the FileStream class and then Seek+ Readmethods and Positionproperty.

+5
source

I would suggest, since you are migrating C applications to a C # application, that you are storing data in objects, not Structures, if you really care about performance activities.

0
source

Source: https://habr.com/ru/post/1765319/


All Articles