[Mono-dev] Are constructors class methods or not?

Jb Evain jbevain at gmail.com
Fri Apr 8 03:31:38 EDT 2011


On Fri, Apr 8, 2011 at 1:47 AM, Chris Seaton <chris at chrisseaton.com> wrote:
> In the former the constructor is marked as class, in the latter it is not.
> Which is correct? Or does the place it is being used lead to the difference?
> Are constructor methods class methods or not?

It looks like a bug in monodis, it should be:

  .custom instance void

I think monodis uses class to tag RuntimeCompatibilityAttribute,
meaning it's not a valuetype, not the ctor, but it shouldn't be here.
In the end, .ctor methods are just like any other method, they just
have this particular name, and the SpecialName and RTSpecialName bits

.cctor methods on the other hand are class methods, but it's not the case here.


More information about the Mono-devel-list mailing list