Jul 22, 2011 at 6:50 AM
Edited Jul 22, 2011 at 7:12 AM
Thanks! You are correct that did seem to do the trick. I am also able to remove an existing BaseClass but I am stuck trying to add a new one. I see that the add method of the BaseClasses collection wants a type of ITypeReference but I am
not sure how to create one that represents the new class I want to add. Do I need to load the assembly that contains the class I want to use as a new baseclass.. or is there some easier way to go about it? I see in the HelloIL sample there is the
But this doesn't really help in getting a class I've created. I did find this function of the PeReader class..
Public Function ResolveSerializedTypeName ( _
typeName As String, _
assembly As IAssembly _
) As ITypeDefinition
But this returns a ITypeDefinition and not a ITypeReference. It would also be great if there was a way to create an ITypeReference for my class without having to know the assembly. Any help you can give would be much appreciated.