13 out of 55 rated this helpful - Rate this topic

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

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.