Question

I have used Reflection.Emit to dynamically generate some types and methods. Everything works fine, but I want to include some descriptive information with the method so that others can use it more easily. You would normall do this by including this above the method:

    /// <summary>
    /// This is my descriptive information
    /// </summary>
    /// <param name="paramName1">paramName1 description</param>
    /// <param name="paramName2">paramName2 description</param>
    /// <param name="glTypeFieldReference"></param>
    /// <returns>Information about the return type</returns>

Is it possible to include this information with Reflection.Emit, and if so, how?

Was it helpful?

Solution

No, because that is not part of the IL metadata. Instead, the compiler writes that into the optional .xml file that goes alongside the dll, and TypeBuilder etc doesn't handle those in any way. You could of course write the xml file separately - the schema should be available somewhere.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top