Hi
I am trying to dynamically create the following structure using
AssemblyBuilder , TypeBuilder and DefineField:
[StructLayout(La youtKind.Sequen tial, Pack = 8)]
public struct SimpleType2
{
public double dScalar1;
public fixed double dArray[5];
public int iScalar1;
}
I've got pretty much everything working except the fixed keyword on the
dArray[5] member. I tried to add this using a custom attribute, but as soon
as I did that, the field was not added to the created type. Is this the
right approach? Could it be that I need to mark the code as unsafe or
something?
Any help would be much appreciated.
Best regards
Marek
I am trying to dynamically create the following structure using
AssemblyBuilder , TypeBuilder and DefineField:
[StructLayout(La youtKind.Sequen tial, Pack = 8)]
public struct SimpleType2
{
public double dScalar1;
public fixed double dArray[5];
public int iScalar1;
}
I've got pretty much everything working except the fixed keyword on the
dArray[5] member. I tried to add this using a custom attribute, but as soon
as I did that, the field was not added to the created type. Is this the
right approach? Could it be that I need to mark the code as unsafe or
something?
Any help would be much appreciated.
Best regards
Marek
Comment