locked
How do I emit a generic method's parameter as a by ref? RRS feed

  • Question

  • I have a case where I am using System.Reflection.Emit to generate a couple of generic methods, in memory. I'm stuck on how to define the following method:

     public void MyMethod<T> (arg1 T, ref arg2 T) ...

    I use MethodBuild.DefineGenericParameter to retrieve a list of GenericTypeParameterBuilders. I then need to create the method's parameters, which is done using MethodBuilder.SetParameters. So my question is, how do I get GenericTypeParameterBuilder 'T' to become a 'ref T' so I can pass it as an element in MethodBuilder.SetParameters' arguments?

    Thanks in advance,
    Paul.
    Thursday, July 27, 2006 4:36 PM

Answers

All replies