I have a partial class split across two files. In the class
declaration found in the first file, I state that it's a sealed class.
In the class declaration found in the second file, I do not use the
keyword sealed. This compiles fine. When I actually try to inherit
from this class, I see that it's sealed.
Can someone explain how this works? If a modifier is found in only one
part of a partial class declaration, will the modifier always apply to
every instance of the class? (Note: we'd see a compile error if I
tried to mix two opposed modifiers, like abstract and sealed.) I
didn't expect my original experiment to work, and then it did; it's
both neat and a little confusing. Any clarification is appreciated.
Thanks,
Cody Powell