:))
I solved my problem :P

memory size of field which is to be initialized MUST be the same as
initialization data. I created a struct "size10" with size of 10 and then
defined a field of type size10. then I assigned a byte array of length 10 to
that field. Now I have a ".data" section of size 10 in my assembly.

thank you Jb,
You helped me a lot. although I still do not know what RVA is :P

On Tue, Aug 17, 2010 at 6:26 PM, Knight Commander
<[email protected]>wrote:

> I applied these changes, now there is something else
>
> I have the following line in disassembled file:
>
> .field private static uint8[] initdar at I_00002050
> ....
> .data cil I_00002050 = bytearray(41)
>
> length of this byte array is just one! when I have 5 bytes in my
> initialValue;
>
>
> On Tue, Aug 17, 2010 at 6:16 PM, Knight Commander <[email protected]
> > wrote:
>
>> Oh! thank you!
>>
>> But, should it be always static?
>>
>> On Tue, Aug 17, 2010 at 6:11 PM, Jb Evain <[email protected]> wrote:
>>
>>> You should pass the import of typeof (object) as the base type of your
>>> class.
>>>
>>> You have to pass FieldAttributes.Static | FieldAttributes.HasFieldRVA
>>>
>>> --
>>> Jb Evain  <[email protected]>
>>>
>>> --
>>> --
>>> mono-cecil
>>>
>>
>>
>>
>

-- 
--
mono-cecil

Reply via email to