So I'm calling a method from my dll using this.
string sp = "dynamicmethodname";
Type TypeObj = typeof(DLLclass);
Object MyObj = Activator.CreateInstance(TypeObj);
TypeObj.InvokeMember(sp, BindingFlags.InvokeMethod | BindingFlags.Default, null, MyObj, new Object[] { gp });
it will work if my method is just under my public class. But when I tried to do something like this.
public class Test {
public static class Met1{
public static void _Validate(string gp){
functions here.....
}
}
}
The invokemember method won't reach my _Validate method anymore. I wonder why it won't work anymore.
Full example of what @Charleh wrote:
Compiled: https://ideone.com/JIoHar