Bug 41917 - GetRuntimeProperties
Summary: GetRuntimeProperties
Status: RESOLVED DUPLICATE of bug 41874
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: 4.4.0 (C7)
Hardware: PC Windows
: --- normal
Target Milestone: (C7SR0)
Assignee: Marek Safar
Depends on:
Reported: 2016-06-16 22:38 UTC by Christian Schwarz
Modified: 2016-06-17 11:53 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Christian Schwarz 2016-06-16 22:38:08 UTC
public abstract class A<T>
	public abstract T Item { get; set; }

public class B : A<string>
	public override string Item { get; set; }


Returns Item twice instead of once.

Works as expected in a console application and with dotnet core.
Comment 1 Jonathan Pryor 2016-06-16 22:47:55 UTC
This happens with desktop Mono 4.4 as well:

  using System;
  using System.Linq;
  using System.Reflection;
  using System.Collections.Generic;
  public abstract class A<T>
    public abstract T Item {get;set;}
  public abstract class B : A<string>
    public override string Item {get;set;}
  class App {
     static void Main ()
       var props = typeof(B).GetTypeInfo().GetRuntimeProperties().ToList();
       Console.WriteLine (string.Join ("\n", props.Select (p => p.Name)));

Output when running:

Comment 2 Jonathan Pryor 2016-06-16 22:48:35 UTC
Marek: I suspect that this is similar/related to Bug #41874.
Comment 3 Marek Safar 2016-06-17 11:53:26 UTC

*** This bug has been marked as a duplicate of bug 41874 ***

Note You need to log in before you can comment on or make changes to this bug.