New Features in C# 2.0—Hide Designer Code with Partial Types

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:Tutorials
C# Tutorials

New Features in C# 2.0

© 2005 O'Reilly Media, Inc.

Hide Designer Code with Partial Types

In previous versions of C# the entire definition for a class had to be in a single file. Now, using the partial keyword, you can split your class across more than one file. This provides two significant advantages:

  • You can have different team members working on different parts of
the class.
  • Visual Studio 2005 can separate the designer-generated code from
your own user code.


Using the partial keyword, you can split your class across more than one file.


Previous_Page_.gif Next_Page_.gif

Personal tools