MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeDeclaration­ExtensionsGet­Topmost­Named­Type
Open sandboxFocus

DeclarationExtensions.GetTopmostNamedType Method

GetTopmostNamedType(IDeclaration)

Gets the topmost type of a nested type, i.e. a type that is not contained in any other type. If the given type is not a given type, returns the given type itself.

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