Open sandboxFocus

Method IsContainedIn

IsContainedIn(IDeclaration, IDeclaration)

Determines if a given declaration is a child of another given declaration, using the ContainingDeclaration relationship for all declarations except for named type, where the parent namespace is considered.

Declaration
public static bool IsContainedIn(this IDeclaration declaration, IDeclaration containingDeclaration)
Parameters
Type Name Description
IDeclaration declaration
IDeclaration containingDeclaration
Returns
Type Description
bool