In the first example, you click Format(String, Object) , which looks at the same time parsed:
public static string Format(string format, object arg0) { return Format(null, format, new object[] { arg0 }); }
Note the new object[] around this.
Secondly, you are apparently clicking on using Format(string, object[]) , at least the one that gets called when I run the same test. Parse, it looks like this:
public static string Format(string format, params object[] args) { return Format(null, format, args); }
So, all of them are actually passed to Format(IFormatProvider, string, object[]) . Cool, let's look at the first few lines:
public static string Format(IFormatProvider provider, string format, params object[] args) { if ((format == null) || (args == null)) { throw new ArgumentNullException((format == null) ? "format" : "args"); } ... }
... welp, here is your problem, right now! The first call is to transfer it to a new array, so it is not equal to zero. Passing to null does not explicitly do this, due to the specific instance of Format() calling.
tmesser Nov 07 '12 at 19:12 2012-11-07 19:12
source share