[Mono-dev] Strange .ctor() behaviour

vijaya raghava mutharaju m.vijayaraghava at gmail.com
Wed Mar 1 16:26:58 EST 2006


          Using Mono.Cecil, I inserted custom attributes into an
assembly. Some of the classes in it are Clock, DisplayTime,
Observer,..... The attribute is a string of type "MyAttribute". Now
after inserting a value and disassembling the assembly, instead of a
statement like the following:

    .custom instance void MyNameSpace.MyAttribute::.ctor() = {01 00
............} // Its value

       It gives

      .custom instance void AnotherNameSpace.Clock::.ctor() = {01 00
........} // value

     While inserting, I gave the correct type of the MyAttribute. The
value I gave is correctly displayed. Its values is correct. Only the
constructor part is the one not intended. There isn't any constructor
even, that matches the above one.

     One more thing, if we use "ILdasm" to disassemble an assembly, is
there any significance to the order in which it displays the types in
the assembly. Got a doubt because "Clock" was displayed first and I
didn't write it in the source code first.

        Thank you.

More information about the Mono-devel-list mailing list