Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0129 Partial type

We can use partial type modifier to split the type definition into more than one files. The following code shows how to use the partial keyword. File: Rectangle1.cs partial class Rectangle{ } File: Rectangle2.cs partial class Rectangle{ } Members cannot be duplicated across partial types.