Z
Zytan
This works:
Console.WriteLine("F: {0:F}", CurrTime);
But this doesn't:
Debug.WriteLine("F: {0:F}", CurrTime);
Any reason why?
Zytan
P.S. How does Debug.WriteLine() (and I assume Console.WriteLine(),
but maybe not) know to invoke ToString() for anything passed to it?
Is it because it demands a string, and the compiler looks for implicit
conversions, and since all classes are derived from Object which has
ToString(), meaning all classes have ToString(), the compiler always
has this to invoke?
Console.WriteLine("F: {0:F}", CurrTime);
But this doesn't:
Debug.WriteLine("F: {0:F}", CurrTime);
Any reason why?
Zytan
P.S. How does Debug.WriteLine() (and I assume Console.WriteLine(),
but maybe not) know to invoke ToString() for anything passed to it?
Is it because it demands a string, and the compiler looks for implicit
conversions, and since all classes are derived from Object which has
ToString(), meaning all classes have ToString(), the compiler always
has this to invoke?