Home / Definitions / Partial Methods
Languages 1 min read

Partial Methods

Written by Vangie Beal

Partial classes and partial methods are two programming language features of .NET programming languages that make it possible for developers to extend and enhance auto-generated code.

Partial methods are methods defined in a partial class that are (optionally) divided across two files. With partial methods one file contains the method signature – the method name, its return type, and its input parameters – while the body is (optionally) defined in a separate file. If the partial method’s body is not defined then the compiler automatically removes the partial method signature and all calls to the method at compile-time. Compare with partial classes.

Was this Article helpful? Yes No
Thank you for your feedback. 0% 0%