CSharp examples for Language Basics:string
Mix string and number during string concatenation
using System;/* w w w. jav a 2 s. co m*/ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Pay special attention when mixing texts with numbers! Console.WriteLine("a) " + 1 + 1); Console.WriteLine("b) " + (1 + 1)); Console.WriteLine("c) " + "mostly fun"); } }