#635 – Limitations on Partial Methods
July 26, 2012 Leave a comment
There are a few limitations on the use of partial methods. A partial method
- Can’t have access modifiers, but is implicitly private
- Can’t be virtual and can’t override or replace a virtual method in a base class (can’t use keyword virtual, new or override)
- Can’t be sealed
- Can’t be abstract
- Can’t be marked as external with the extern keyword
- Must have a return type of void
- Must not have any out parameters
- Can’t directly implement an interface method (since interface methods are public)