I would like to know how to set a value of parameter from method called using reflection ?
This an example below:
ParameterInfo[] parameters = MethodBase.GetCurrentMethod().GetParameters();
foreach (ParameterInfo parameter in parameters)
{
..
//set the value of parameter, looks like that "parameter.SetValue("myValue");
..
}
Aucun commentaire:
Enregistrer un commentaire