I wrote the function to be a replacement for doing something like
this:
string myString = "example" + "example" + "example" + "example" +
"example" + "example";
So instead you do this:
string myString = JoinArgs("example", "example", "example", "example",
"example", "example" );
..which I assume is faster since strings are immutable.
On Jan 30, 1:08 am, Cerebrus <[email protected]> wrote:
> Strings are immutable, the StringBuilder is mutable. The latter does
> not use Strings internally.
>
> On Jan 30, 12:35 am, jay <[email protected]> wrote:
>
>
>
> > Does StringBuilder already do something like this? Or is what I have
> > here good?
>
> > protected string JoinArgs( params string[] args )
> > {
> > return String.Join( "", args );
>
> > }- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -