I have a task to get a static method using reflection as follows:
myType.GetMethod("MyMethod",BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod);
If the class contains MyMethod , everything works correctly, but in case the parent class contains MyMethod , I get null :(. How can I call the static method from the parent using reflection, like the code described above? Thanks.
source share