Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 868615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:10:12+00:00 2026-05-15T10:10:12+00:00

The MSDN Documentation: MemberInfo.GetCustomAttibutes Method (Type, Boolean) states in the remarks: This method ignores

  • 0

The MSDN Documentation: MemberInfo.GetCustomAttibutes Method (Type, Boolean) states in the remarks:

This method ignores the inherit parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the Attribute.GetCustomAttributes method.

This basically means that this implementation’s second parameter (bool inherit) is ignored for event members and property members. However, calling the Attribute.GetCustomAttributes(MemberInfo,Type,bool) variety of this operation does not.

What puzzles me is the design of this.

Why would they seemingly ignore the inherit attribute arbitrarily on 2 forms of member types?

If anyone could shed some light on this I’d be greatly appreciative.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:10:13+00:00Added an answer on May 15, 2026 at 10:10 am

    This is definitely confusing. The strict answer is that properties and events are not inherited so the inherited parameter has no meaning. The reference is ECMA 335 CLI Specification section 8.10.3.

    Fundamentally, properties and events
    are constructs of the metadata
    intended for use by tools that target
    the CLI and are not directly supported
    by the VES itself. Therefore, it is
    the job of the source language
    compiler and the reflection library
    (see Partition IV) to determine rules
    for name hiding, inheritance, and so
    forth. The source compiler shall
    generate CIL that directly accesses
    the methods named by the events and
    properties, not the events or
    properties themselves.

    The specification says nothing about how a compiler should implement this. In the case of C# properties are implemented via separate getter and setter methods which can be declared virtual and override. Likewise, for events there are separate addhandler and removehandler methods.

    So the simple answer is that properties and events are strictly metadata devoid of any implementation according to the specification. That is why they cannot be inherited in the same sense that methods are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The MSDN documentation on Object.GetHashCode() describes 3 contradicting rules for how the method should
The MSDN documentation says that public class SomeObject { public void SomeOperation() { lock(this)
The MSDN documentation is (somewhat) clear about the following two facts about GDI Pens:
From the MSDN documentation: Synchronized supports multiple writing threads, provided that no threads are
In many places in msdn documentation you can find references to App_Data directory. For
It is unclear to me from the MSDN documentation if I should provide a
I have been reading the MSDN documentation on subclassing and I have been successful
I am unable to create an empty solution in Visual Studio. The msdn documentation
Is there an easy way to produce MSDN-style documentation from the Visual Studio XML
In C# documentation tags allow you to produce output similar to MSDN. What are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.