How can a partial class be useful in coding? Can anyone explain in detail with examples?
Partial class is use full when multiple users are working on same class so keyword partial is used. but when compiler compiles the code it combine all partial classes with same name to one class.hence it reacts as one class.
This might help you out.
http://www.4guysfromrolla.com/articles/071509-1.aspx
Another use: if you have a giant tab control with many tabs that you want to split into one tab's code per file, you can do that with partials.
The most prevalent example is in code-generation. The WinForms designer as of Visual Studio 2005 does this. It allows code-generated code to go into one file, while your hand-crafted code stays in another file. They are glued together at the end by the compiler.
Source msdn.
Have a look at this link.
I have seen people using partial classes to separate classes that are too large into separate files - where a better solution would be to split the class up into many separate classes.
I consider it an anti-pattern to use partial classes for splitting hand written classes into separate files.