All pastes #405799 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-21 23:03 UTC
rendered paste body
using System;
using System.Text;

class strtest
{
	static void Main ()
	{
		string a = "foo";
		string b = "bar";
		string c = "baz";

		string d = "   ";

		for (int i = 0 ; i != 10000000 ; i++)
			d = Run1 (a, b, c);
	}

	static string Run1 (string a, string b, string c)
	{
		return a + b + c;
	}

	static string Run2 (string a, string b, string c)
	{
		StringBuilder sb = new StringBuilder ();
		sb.Append (a);
		sb.Append (b);
		sb.Append (c);
		return sb.ToString ();
	}
}