Daniel Cazzulino's Blog : Reflection severely broken for properties

Subscriptions

News

Source code published in this blog is public domain unless otherwise specified.

 

kzu in LinkedIn

  Microsoft MVP Profile

 Contact

Post Categories

Reflection severely broken for properties

PropertyInfo.GetCustomAttributes never returns attributes inherited from the base class if the property is an override.

Even worse, if you ask for Attributes.IsDefined with the same values, you will get a true!! :S:S:S... Can't believe a release of .NET comes out without an automated test for those kinds of things...

You can see the bug, get a repro class, and vote for it on Product Feedback.

posted on Wednesday, September 28, 2005 6:35 PM by kzu