Given the following method: (real method has a few more parameters, but the important ones are below...)
public string DoSomething(string formatter, params string[] values)
{
// Do something eventually involving a call to String.Format(formatter, values);
}
Is there a way to tell if my values array has enough objects in it to cover the formatter, so that I can throw an exception if there aren't (short of doing the string.Format; that isn't an option until the end due to some lambda conversions)?