string output;int selection = 5;// Generate the output stringoutput = string.Format("You selected item {0} from the list.", selection);Console.WriteLine(output); // Outputs "You selected item 5 from the list."