What's the problem here? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
4th Dec 2020, 5:51 AM
Shweta Mahajan
Shweta Mahajan - avatar
4 Answers
+ 3
Shweta Mahajan The object op of MethodInfo is null. You need to take care of it like this double result = 0.0; if (op != null) result = (double)op.Invoke(pol, new object[] {});
4th Dec 2020, 6:13 AM
A͢J
A͢J - avatar
+ 8
Ig the issue starts from the line 66! Coz there might be a misconception in "ecomy times" .. Is it Shweta Mahajan ?
4th Dec 2020, 6:50 AM
Piyush
Piyush - avatar
+ 2
AJ #Learn With Me 👨‍💻 Appreciate your help ! 😄 It's working now.
4th Dec 2020, 7:20 AM
Shweta Mahajan
Shweta Mahajan - avatar
+ 1
Piyush[21 Dec❤️] Solved it! MethodInfo was the problem here, I intentionally added new Type[] so that I can access other methods also (for separate program), the main method was forcing to get other method which is not present in the namespace.
4th Dec 2020, 7:18 AM
Shweta Mahajan
Shweta Mahajan - avatar