A
Author
I have always been wondering if there is any significant different
between doing
System.Console.WriteLine("Employee Name = " + employee.FirstName + " "
+ employee.LastName);
and
System.Console.WriteLine("Employee Name = {0} {1}",
employee.FirstName, employee.LastName);
Is it a matter of preference or is there a performance issue with the
first version rising from creating immutable strings through
concatenation?
Thank you.
between doing
System.Console.WriteLine("Employee Name = " + employee.FirstName + " "
+ employee.LastName);
and
System.Console.WriteLine("Employee Name = {0} {1}",
employee.FirstName, employee.LastName);
Is it a matter of preference or is there a performance issue with the
first version rising from creating immutable strings through
concatenation?
Thank you.