Showing posts with label Classes. Show all posts
Showing posts with label Classes. Show all posts

Friday, 16 November 2012

Partial Classes

0 comments Posted by Unknown at 08:44

Partial Classes

The partial keyword allows the class, struct, or interface to span across multiple files. Typically, a class will reside entirely in a single file. However, in situations where multiple developers need access to the same class, or more likely in the situation where a code generator of some type is generating part of a class, then having the class in multiple files can be beneficial.
The way that the partial keyword is used is to simply place partial before class, struct, or interface. In the following example the class TheBigClass resides in two separate source files, BigClassPart1.cs and BigClassPart2.cs:
Read More »
 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Object Orienred Programming | Template by Blogger Widgets

Home | About | Top ▲