Open sandboxFocus

Method GetClosestNamedType

GetClosestNamedType(IDeclaration)

Gets the declaring INamedType of a given declaration if the declaration if not an INamedType, or the INamedType itself if the given declaration is itself an INamedType.

Declaration
public static INamedType? GetClosestNamedType(this IDeclaration declaration)
Parameters
Type Name Description
IDeclaration declaration
Returns
Type Description
INamedType