467,140 Members | 1,362 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,140 developers. It's quick & easy.

Reading data from a file

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
Feb 9 '06 #1
  • viewed: 1380
Share:
1 Reply
See there
http://groups.google.com/group/micro...014e3083fe9cd0
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

Feb 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andy | last post: by
1 post views Thread by fabrice | last post: by
3 posts views Thread by SB | last post: by
7 posts views Thread by John Dann | last post: by
4 posts views Thread by Amit Maheshwari | last post: by
6 posts views Thread by arne.muller@gmail.com | last post: by
13 posts views Thread by swetha | last post: by
6 posts views Thread by efrenba | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.