PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Instruction­Block Class / Instruction­Block Methods / Instruction­Block.​Find­Common­Ancestor Method

InstructionBlock.FindCommonAncestor Method

Finds the deepest common ancestor of two blocks in the method body tree.

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 static InstructionBlock FindCommonAncestor(
	InstructionBlock first,
	InstructionBlock second
)

Parameters

first
Type: PostSharp.Sdk.CodeModel.InstructionBlock
An InstructionBlock.
second
Type: PostSharp.Sdk.CodeModel.InstructionBlock
An InstructionBlock.

Return Value

Type: InstructionBlock
An InstructionBlock, or null if no common ancestor was found.
See Also