Skip to content

Can we define a memory structure ( or File structure ) in C# #65051

Answered by Clockwork-Muse
John0King asked this question in Q&A
Discussion options

You must be logged in to vote

None of these are unique to C#, and all behave identically or similarly in C/C++ (some of them, particularly "type used" may depend on compiler flags, which is its own pain).

Why are you asking, and what are you wanting to achieve? If you're trying to create a struct that exactly maps to some binary format, you'd normally look at the StructLayout Attribute, but there may be other or better ways to do whatever it is you're trying to achieve.

Replies: 5 comments 15 replies

Comment options

You must be logged in to vote
7 replies
@John0King
Comment options

@Clockwork-Muse
Comment options

@John0King
Comment options

@Clockwork-Muse
Comment options

@John0King
Comment options

Answer selected by John0King
Comment options

You must be logged in to vote
1 reply
@Clockwork-Muse
Comment options

Comment options

You must be logged in to vote
3 replies
@John0King
Comment options

@John0King
Comment options

@ChristophTF
Comment options

Comment options

You must be logged in to vote
2 replies
@John0King
Comment options

@Clockwork-Muse
Comment options

Comment options

You must be logged in to vote
2 replies
@Clockwork-Muse
Comment options

@alexrp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants