|Alvaro Mendez wrote:
I'd like to get some opinions on the pros and cons of each approach.
By using the argument substitution you can add additional formatting to the WriteLine call (such as pad numbers or strings) which you may or may not be able to do the other way, depending on how the
ToString method is written for each variable's type.
Another advantage is if you are localizing your application you only have one string to replace instead of 2 for your example.
As you point out the con is that you aren't placing the variable right there so you need to reference back and forth to get the whole picture.
Alvaro Mendez wrote:
as Debug.WriteLine and Trace.WriteLine
A shame too, I find myself having to do:
string.Format inside of the
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation