PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Method­Def­Declaration Class / Method­Def­Declaration Methods / Method­Def­Declaration.​Get­Parent­Definition Method / Method­Def­Declaration.​Get­Parent­Definition Method (Boolean)

MethodDefDeclaration.GetParentDefinition Method (Boolean)

When the current method overrides a method in a parent type, returns the overridden method, and specifies whether the method should recurse to the root definition of the method.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public MethodDefDeclaration GetParentDefinition(
	bool recursive
)

Parameters

recursive
Type: System.Boolean
true to return the root definition of the method, false to return the closest parent.

Return Value

Type: MethodDefDeclaration
The overridden method, or nullif the current method does not override any method.
See Also