String.Format vs + operator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?G=F6ran_Andersson?=

    #16
    Re: String.Format vs + operator

    Jon Skeet [C# MVP] wrote:
    On Jun 26, 10:02 am, "Jon Skeet [C# MVP]" <s...@pobox.com wrote:
    >>>which I would argue is more readable (syntax coloring will make it even more
    >>>readable) than
    >>Yes, it's more readable, but also slower.
    >Nope, I don't believe so.
    >
    <snip>
    >
    Ah. Just reread your post. I assume now that you were *actually*
    saying that
    >
    string y = "a" + b + "c";
    is slower than
    string y = "a" + b.ToString() + "c";
    >
    in which case I agree. Oops.
    >
    Jon
    >
    Yes, that's what I meant. Sorry for not being specific about what I was
    comparing against. :)

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    Working...