Hello All:
I'm having this little trouble getting a form displayed using
reflection.
objForm.GetType().GetMethod("ShowDialog",
BindingFlags.InvokeMethod).Invoke(objForm, null);
The above is the line of code that is causing this trouble. I'm getting
a NullreferenceException at this line.
I have debugged and checked that objForm is fine and is not null, and
the MethodInfo is correct too and is not null again.
Once I get the MethodInfo I try the Invoke(object, params);
Because the ShowDialog method for the Form class doesnt accept any
parameters, I pass a null value here.
Can anyone point why I'm getting this NullReferenceException?
Thanks In Advance.
Skandy.