C#: Partial Classes
This is quick confirmation question:
In order to make partial classes work, I initially thought that there would be a main Class public class ManageDates
and then you would create partial classes like public partial class ManageDates
to extend the ManageDates class.
But from some experimenting, I've come to find out that if you're going to use partial classes, each individual class must be declared public partial class [ClassName]
...
Am I correct in this concl开发者_JAVA百科usion?
Yes, each piece of a partial class must be declared partial
and reside in the same assembly.
This is because partial classes are just a compiler convenience; once the assembly is created, all of the contents of the class are in a single location.
Yes.
Each part of the class must be declared using the partial
keyword.
精彩评论