Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

partial (C# Reference)

Partial type definitions allow the definition of a class, struct or interface to be split into multiple files.

In File1.cs:

namespace PC
{
    partial class A { }
}

In File2.cs:

namespace PC
{
    partial class A { }
}

Splitting a class, struct or interface type over several files can be useful when working with large projects, or with automatically generated code such as that provided by the Windows Forms Designer. For more information, see Partial Classes.

For more information, see the following sections in the C# Language Specification:

  • 19.4 Partial types

  • 23 Partial Types

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft