c# - RuntimeBinderException on inherited interfaces -


i getting runtimebinderexception when calling inherited method of interface passing dynamic 1 of arguments.

i not understand behaviour.

here complete example:

using system;  class program {     static void main(string[] args)     {         dynamic dyn = new record();          iadvancedtable advtable = new table();         itable table = advtable;          // works charm using "base-interface"         table.insert(dyn);           // using inherited interface throws runtimebinderexception         advtable.insert(dyn);          console.readkey();     } }  public interface itable {     void insert(record record); }  public interface iadvancedtable : itable{}  public class table : iadvancedtable {     public void insert(record record){ /*stub*/ } }  public class record{} 

looks there no recursion in runtimebinder checking "inherited interfaces" on actual interface. there reason this?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -