开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜