Skip to content

Inconsistent GetRuntimeProperties() Behavior #28056

@mikernet

Description

@mikernet

In the following example:

public class Test : TestBase
{	
	public new string Value { get; }
}

public class TestBase
{
	public string Value { get; }
}

If you call typeof(Test).GetRuntimeProperties() it only returns 1 property. If you change the property type in the Test class to something else (i.e. int) then it returns 2 properties. That behavior clearly doesn't make sense - I believe it should be returning both properties in both situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Reflectionbreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.bugneeds-author-actionAn issue or pull request that requires more info or actions from the author.no-recent-activity

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions