Please, could you post a small sample that created a constructor for a
new type...?

On Jan 10, 2008 12:30 AM, Jb Evain <[EMAIL PROTECTED]> wrote:
>
> Hey,
>
> On 1/9/08, ursuletzu <[EMAIL PROTECTED]> wrote:
> >  ////  PROBLEM 1: WHAT SHOULD I PASS TO CustomAttribute constructor,
> > what MethodReference? I cannot /////  pass null because i get an
> > exception!
>
> How surprising :)
>
> >              assembly.CustomAttributes.Add(new
> > CustomAttribute( ??? ) );
> >
> > I  think it might be a constructor but i need your help here:
> >
> > PROBLEM 2: If it is a constructor, I can't get a grip on one,
> > Attribute has a default constructor and i cannot get it with
> > Reflection:
>
> You need to create your own default constructor for
> CecilGeneratedAttribute, add it to its .Constructors collection, and
> pass it to the CustromAttribute constructor.
>
> --
> Jb Evain  <[EMAIL PROTECTED]>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to