Monday, 26 November 2012

c sharp programming

String Concatenation




string variables can be connected together to build larger strings via the C# + operator. As you may
know, this technique is formally termed string concatenation. Consider the following new helper
function:

static void StringConcatenation()
{
  Console.WriteLine("=> String concatenation:");
  string s1 = "Programming the ";
  string s2 = "PsychoDrill (PTP)";
  string s3 = s1 + s2;
  Console.WriteLine(s3);
  Console.WriteLine();
}

No comments:

Post a Comment