All the parts of class must have the same accessibility like public or private, etc.
If any part of the class is declared an abstract, sealed or base type then the whole class is declared of the same type.
Different parts may have different base types and so the final class will inherit all the base types.
The Partial modifier must be only appear immediately before the keywords class, struct, or interface.
Nested partial types are also allowed.
Advantages of Partial Class
Multiple developers can easily work simultaneously with a single class in a separate files.
When working with automatically generated source, code may be added to the class without having to recreate a source file. For example, Visual Studio separates HTML code for the UI and server side code into two separate and different files: .aspx and .cs files.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Partial Class Requirements:
Advantages of Partial Class