c# - Get concrete property that implements type -


given following classes

public foo  {   public foo() {     this.bar = new bar();   }    public ibar bar{ get; set;} }  public bar : ibar {  // implemented properties  } 

how can concrete implementation of property bar on foo using reflection?

instance.gettype().getproperty("bar").propertytype 

yields interface only.

if trying type implements ibar should it's value , take type:

var type = instance.gettype().getproperty("bar").getvalue(instance,null).gettype() 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -