Using reflection to call an internal method
-
I have a method: internal void SetTopic( ) { } Using Reflection I want to call it PropertyInfo method = type.GetMethod("SetTopic", BindingFlags.?); Which binding flag do I include to find a method with an Internal modifier? Thanks, Nick
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog
-
I have a method: internal void SetTopic( ) { } Using Reflection I want to call it PropertyInfo method = type.GetMethod("SetTopic", BindingFlags.?); Which binding flag do I include to find a method with an Internal modifier? Thanks, Nick
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog
MethodInfo method = type.GetMethod("SetTopic", BindingFlags.Instance | BindingFlags.NonPublic);
Vitaliy Tsvayer Tikle