Concatenate various values as string in CSharp
Description
The following code shows how to concatenate various values as string.
Example
//www.j a v a2 s . c o m
using System;
public class ConcatDemo {
public static void Main() {
string result = String.Concat("hi ", 10, " ",
20.0, " ",
false, " ",
23.45M);
Console.WriteLine("result: " + result);
}
}
The code above generates the following result.