Open sandboxFocus

Property ContainingDeclaration

ContainingDeclaration

Gets the containing declaration, such as a INamedType for nested types or for methods. For non-nested types, returns the containing assembly (and not the namespace, use ContainingNamespace for that).

Declaration
IDeclaration? ContainingDeclaration { get; }
Property Value
Type Description
IDeclaration