I want to take a string like "driverLib.GetTotalRecordCount(\"name_of_table\")"
and run it like a function call.
I followed the instructions from this post:
Calling a function from a string in C#
but I get an error saying the function doesn't exist in MySQLLib.
Code:
MySQLLib driverLib = new MySQLLib();
string funcName = "driverLib.GetTotalRecordCount";
string userParam = "\"name_of_table\"";
// Code from the link
Type thisType = this.GetType();
MethodInfo theMethod = thisType.GetMethod(funcName);
theMethod.Invoke(this, userParam);