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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2014, 6:23 AM EST
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'.
Amina Badat6 reputationPosted Mar 4, 2014, 6:48 AM EST
Amina Badat6 reputationPosted Mar 4, 2014, 6:48 AM EST
VulpesRank #55 · 29.2K reputationPosted Mar 4, 2014, 12:33 PM EST