C#. Where struct methods code kept in memory?
Posted
by maxima120
on Stack Overflow
See other posts from Stack Overflow
or by maxima120
Published on 2010-03-09T08:10:34Z
Indexed on
2010/03/09
8:21 UTC
Read the original article
Hit count: 184
It is somewhat known where .NET keeps value types in memory (mostly in stack but could be in heap in certain circumstances etc)...
My question is - where is the code of the struct?
If I have say 16 byte of data fields in the struct and a massive computation method in it - I am presuming that 16 byte will be copied in stack and the method code is stored somewhere else and is shared for all instances of the struct.
Are these presumptions correct?
© Stack Overflow or respective owner