I tried this:
nestedType.DeclaringType.NestedTypes.Remove(nestedType);
nestedType.DeclaringType = null;
module.Types.Add(nestedType);
nestedType.IsPublic = false;But the result of this during execution is: Unhandled Exception: System.TypeLoadException: Could not load type '<type>' from assembly '<assembly>' because the format is invalid. Any ideas? Thanks! Timwi -- -- mono-cecil
