I have a master form with a bunch of sub forms. Each sub form has the same method name "RefreshData". I need help finishing the invoke method to execute the refreshdata method on the subform from the master form. My code is below.
button click event on master form. ClsCommon.NewRfrmCurr holds the current sub form object.
var type = ClsCommon.NewRfrmCurr.GetType();
MethodInfo[] methods = type.GetMethods();
foreach (MethodInfo method in methods)
{
if (method.Name == "RefreshData")
{
method.Invoke(?);
}
}