Create separate class files from one file that contains multiple public partial classes

457 views Asked by At

I have a process that converts an xml file/object into a set of public partial classes. It uses the same code base as xsd.exe (I think) to create schemas from the xml and then create classes from the schemas.

However, I am wanting to split each public partial class into its own file. Is there an easy way (some sort of existing .net object or something) to load the classes in an object in .net and then say loop through each and write it to file?

1

There are 1 answers

1
Oakcool On

The easiest way to refactor this is by using a tool. Resharper happens to be a good one for this purpose, check it out at:

https://www.jetbrains.com/resharper/

There are other options so do some search before you commit to one tool.