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