Skip to content

Conversation

fcurdi
Copy link

@fcurdi fcurdi commented May 11, 2020

Static fields can define their init value as a constant stored in the PE File. The value is declared using the .data directive, represented as a bytearray and labeled (so it can be referenced later).

Initialization of a static array field is an example of this. The field itself does not hold the initial value. A special type is created (<PrivateImplementationDetails>) that has a field that references the value declared with .data. It is then used in the constructor of the class that has the static array field to initialize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant