AmbiguousMatchException - Type.GetProperty - C # Reflexão

ntem, deparei-me com um problema ao desenvolver uma Web Part (esta pergunta não é sobre webpart, mas sobre C #). Pouco conhecimento sobre o problema. Eu tenho um código que carrega a WebPart usando o Reflection, no qual obtive o AmbiguousMatchException. Para reproduzi-lo, tente o código abaixo

        public class TypeA
        {
            public virtual int Height { get; set; }
        }
        public class TypeB : TypeA
        {
            public String Height { get; set; }
        }
        public class Class1 : TypeB
        {

        }

        Assembly oAssemblyCurrent = Assembly.GetExecutingAssembly();
        Type oType2 = oAssemblyCurrent.GetType("AmbigousMatchReflection.Class1");
        PropertyInfo oPropertyInfo2 = oType2.GetProperty("Height");//Throws AmbiguousMatchException 
        oPropertyInfo2 = oType2.GetProperty("Height", 
            BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);  // I tried this code Neither these BindingFlags or any other didnt help

Eu queria saber o BindingFlag para buscar a propriedade Height. Você terá a pergunta de por que eu queria criar outra Propriedade Height que já esteja lá na classe Base. É assim que oMicrosoft.SharePoint.WebPartPages.PageViewerWebPart foi projetado, verifique a propriedade Height da classe PageViewerWebPart.

questionAnswers(8)

yourAnswerToTheQuestion