Mix string and integer in string cancatenation : String Concat « String « C# / CSharp Tutorial






using System;  

class MainClass {  
  public static void Main() {  

    string result = String.Concat("hello ", 88, " ", 20.0, " ", 
                           false, " ",  23.45M);  
    Console.WriteLine("result: " + result);  
  }
}
result: hello 88 20 False 23.45








5.8.String Concat
5.8.1.Append strings using Concat()
5.8.2.Concatenate string with integers
5.8.3.Mix string and integer in string cancatenation
5.8.4.Concatenate string with non-strings
5.8.5.String concatenation
5.8.6.Concat method with a String array.