Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#reflection and attributesSingle-choice MCQ

What does GetCustomAttributes return here for a derived class?

[AttributeUsage(AttributeTargets.Class, Inherited = false)] sealed class MarkAttribute : Attribute {} [Mark] class Base {} class Derived : Base {} var attrs = typeof(Derived).GetCustomAttributes(typeof(MarkAttribute), inherit: true);