call an unknow method with named params in csharp
myMethod is the name of the method (string)
String [] argNames = new String[ 1 ]; String [] argValues = new String[ 1 ]; argNames[0]="param"; argNames[1]="value"; Type t = myObject.GetType(); t.InvokeMember ( myMethod, BindingFlags.InvokeMethod, null, site, argValues, null, null, argNames);