Minh

Minh

  • NA
  • 5
  • 21.3k

Call a function or procedure using text as its name

Apr 28 2010 3:27 AM

I am in trouble with a problem in which , i put my procedure name in database and now i  want to call it from windows form . but i do not know how to start with it .
Please follow this simple example for your reference :  I call a procedure named "OpenFormInventory" and what i want to do is call this procedure in code below :
public void CallProcedure ( string NameProc)
{
// codes to call procedure named NameProc here
}
and then call from anywhere : CallProcedure("OpenFormInventory");

---------------------------------------------------------------------------------------------------
Thank you in advance .



Answers (2)