T
Tobias Olbort
Hello,
i've a outer function, which takes a params-array as a parameter. I
want to pass this array to inner function with a params-array (e. g.
string.format).
When i've passed an integer to the outer function, the string.format
sets the string-value "System.Object[]" at the position of {0}.
How can i get it work, so that all my values, passed to the outer
function, will inserted by string.format, like i've passed it to the
inner function directly?
public static object SQLImmediate(string format, params object[] arg)
{
SqlCommand cmd = new SqlCommand(String.Format(format, arg), _cn);
return cmd.ExecuteScalar();
}
Thanks for any help
Tobias
i've a outer function, which takes a params-array as a parameter. I
want to pass this array to inner function with a params-array (e. g.
string.format).
When i've passed an integer to the outer function, the string.format
sets the string-value "System.Object[]" at the position of {0}.
How can i get it work, so that all my values, passed to the outer
function, will inserted by string.format, like i've passed it to the
inner function directly?
public static object SQLImmediate(string format, params object[] arg)
{
SqlCommand cmd = new SqlCommand(String.Format(format, arg), _cn);
return cmd.ExecuteScalar();
}
Thanks for any help
Tobias