Are arguments passed to a function contained in an array object?

  • Thread starter Thread starter Gabriel Lozano-Morán
  • Start date Start date
G

Gabriel Lozano-Morán

I want to pass to the CreateInstance method the arguments that were passed
to the CreateParameter method without creating an array list first.

public IDataParameter CreateParameter(string parameterName, DbType dbType,
int size)
{
...
parameter =
(IDataParameter)Activator.CreateInstance(this._parameterType[(int)this.ProviderType],
__argList);
...

}

Gabriel Lozano-Morán
 
I believe I have found an answer to my question. Please correct me if there
is a better approach.

To retrieve the parameters passed to the function I do the following:
System.Reflection.MethodBase.GetCurrentMethod().GetParameters()

Gabriel Lozano-Morán
 
To retrieve the parameters passed to the function I do the following:
System.Reflection.MethodBase.GetCurrentMethod().GetParameters()

That gets you reflection info about the formal parameters
(ParameterInfo) but not the actual argument values passed to the
method.


Why don't you want to create an array?



Mattias
 
Back
Top