partial and abstract classes
How do I know which are partial and abstract classes?
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 4, 2014, 5:33 PM
Amina BadatPosted Mar 4, 2014, 11:48 AM
Amina BadatPosted Mar 4, 2014, 11:48 AM
VulpesPosted Mar 4, 2014, 11:23 AM
partial class A
{
// contents
}
partial class A
{
// the contents will be added to the other partial class, A, at compile time
// and compiled as a single class
}
Abstract classes are marked with the 'abstract' keyword:
abstract class B
{
// contents
}
A class can be both partial and abstract:
abstract partial class C
{
// contents
}
abstract partial class C
{
// the contents will be added to the other partial class, C, at compile time
// and compiled as a single class
}
Note that 'abstract' must precede 'partial'.