Reading data from a file

R

Roob

I am learning C# and was wandering if there is a straightforward way to read
a binary file created by C++. For example, I have a data structure as
follows:

typedef struct _data
time_t date;
int seq;
char name[20];
short bday;
BOOL bIsWorking;
};

My first question is for just reading data back into a C# data structure,
will I need to create a struct using the same techniques for passing data to
unmanaged code (Runtime.Interop.Services)?
Second, how could I read this in using a data structure, is that possible?

Thanks for any help, I'll keep plugging a way at it any way!

Reuben
 
G

Guest

See there
http://groups.google.com/group/micr...tnet+read+c+++structure&#doc_65014e3083fe9cd0
I am learning C# and was wandering if there is a straightforward way to read
a binary file created by C++. For example, I have a data structure as
follows:

My first question is for just reading data back into a C# data structure,
will I need to create a struct using the same techniques for passing data to
unmanaged code (Runtime.Interop.Services)?
Second, how could I read this in using a data structure, is that possible?

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top