Partial and abstract classes
How do you know when to use partial within an abstract class and what is it's function?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 2, 2014, 3:37 PM
Notice though that not all methods or properties of an abstract class need be abstract and static members are never abstract.
aresha newalaniPosted Mar 2, 2014, 2:36 PM
VulpesPosted Mar 2, 2014, 1:32 PM
This is particularly useful when a code generator is generating code for part of the class such as when creating a Form class in Visual Studio.
In the case of an abstract class, I'd have thought it was unlikely that a code generator would be creating part of the class but two or more human programmers might want to work on it simultaneously.
Incidentally, you don't necessarily have to declare all the partial classes as being abstract. If just one is abstract, then so is the whole class.