I am having a bit of a design issue. What I am working on is a drag and drop in a C# desktop app. I am using the .NET treeview control and a third party grid (not important). I am using this drag and drop operation of a file system in more than one place so I’ve created a static class to handle this. Now this is not just an ordinary file system. The treeview is a representation of the directories and the grid has the files. The complicated part is that there is a logical file system as well so all of this is stored in a database as well. I am only explaining all of this because I wanted to explain why I have a problem. Because I am working with a number of objects at this point, all of my static methods have a large number of parameters. All of my static methods are pretty much all using the same parameters as wel Would there be something I can do to avoid this?
Share
Reduce your parameters by encapsulating those fields in common objects, e.g.
Instead of having:
You could have:
Where Name could be represented by,