| ||Classes and Objects - slide 17 : 29|
Static Classes and Partial Classes in C#
A static class C can only have static members
A partial class is defined in two or more source files
- Static class
- Serves as a module rather than a class
- Prevents instantiation, subclassing, instance members, and use as a type.
- Examples: System.Math, System.IO.File, and System.IO.Directory
- Partial class
- Usage: To combine manually authored and automatically generated class parts.