And the Winner is..
Looks like David Stone one out by under a
minute… If John
St. Clair had only hit “add” a little faster…"urn:schemas-microsoft-com:office:office" />
"urn:schemas:contacts" />David and
John both hit the nail on the head.. here is
David’s response:
Ø
No... because in the second
Format method, the format param is "{0}" and the args is an Object[].
Ø
Thus the args parameter is not null
in and of itself. It has a null string in the first slot, but the first method
just gave it an Object[], so it won't throw any exception.
= "urn:schemas-microsoft-com:office:smarttags"
/>Kevin
Dente tried it out and said it didn’t throw… Hmm… I just checked it
and on my machine it doesn’t throw, here is my code:
static void
Main(string[] args)
{
string firstName = null;
Console.WriteLine (String.Format ("{0}",
firstName));
Console.ReadLine();
}
Brad, Guy of .NET makes a valid
point that we generally treat null and String.Empty to be the samething.. true,
true, and I encourage others to do the same but I don’t see how that effects
this code..
..brad