A partial class is used if you want to define a class over one or more files.
This is typically used to separate code that generates a user interface from code that contains user interface logic. C # does this, for example.
Sometimes, when I have a huge class that cannot be broken up in other ways, I used partial classes to separate groups of methods, although I do this very rarely.
source share