Hi Dhananjay, This error means that for the module you're manipulating, you're using directly an instance of a Reference or a Definition for another module.
For instance, you can't take a TypeDefinition from a module and add it to another module. Jb On Fri, Jan 9, 2015 at 8:23 AM, Dhananjay Dhamale <[email protected]> wrote: > Hi, > I am writing an application using mono-cecil to create a new assembly where > all members will be "public" by changing access specifier from "private" to > "public" for all members of an existing assembly. I am changing the name of > all Types to "_NewType" and delete the original type. It worked all fine > with normal class but it fails where class has nested class. And it gives > exception as - "Member 'Math.InternalClass' is declared in another module > and needs to be imported". > > The source code is as below - > > internal sealed class InternalClass > { > private InternalClass() > { > > } > > private sealed class Singleton > { > public InternalClass CreateInstance() > { > //return new InternalClass(); > InternalClass a = new InternalClass(); > return a; > } > } > } > > Appreciate your help on this. > > Thanks, > Dhananjay > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
