Permalink
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (48 sloc) 1.96 KB
title ms.date ms.prod ms.technology ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author translation.priority.ht
partial (Type) (C# Reference)
2015-07-20
.net
devlang-csharp
article
partialtype
partialtype_CSharpKeyword
CSharp
partial types [C#]
27320743-a22e-4c7b-b0b3-53afe3607334
24
BillWagner
wiwagn
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

partial (Type) (C# Reference)

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

In File1.cs:

[!code-cscsrefKeywordsContextual#3]

In File2.cs the declaration:

[!code-cscsrefKeywordsContextual#4]

Remarks

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

C# Language Specification

[!INCLUDECSharplangspec]

See Also

C# Reference
C# Programming Guide
Modifiers
Introduction to Generics