-
Notifications
You must be signed in to change notification settings - Fork 1
Partial Classes
Mario Gutierrez edited this page Jan 7, 2017
·
1 revision
The partial
keyword allows classes to be split among multiple files. The file names don't matter,
only that the class name and namespace are the same.
This is one way you could split things up:
// Cookie.cs
partial class Cookie
{
// Methods
// Properties
}
// Cookie.Boilerplate.cs
partial class Cookie
{
// Field data
// Constructors
}
- Abstract Classes
- Access Modifiers
- Anonymous Methods
- Anonymous Types
- Arrays
- Attributes
- Console I/O
- Constructors
- Const Fields
- Delegates
- Enums
- Exceptions
- Extension Methods
- File IO
- Generics
- Interfaces
- Iterators
- LINQ
- Main
- Null Operators
- Parameters
- Polymorphism
- Virtual Functions
- Reflection
- Serialization
- Strings
- Value Types
- "Base" Keyword
- "Is" and "As"
- "Sealed" Keyword
- nameof expression