# Example 4

using System;

class MainClass
{
  public static void Main ()
  {
    string wholeNumbers = $"{{0, 1, 2, 3}}";
    string message = "Set of first four";

    Console.WriteLine($"{message} {"whole numbers"} is {wholeNumbers}");
  }
}
1
2
3
4
5
6
7
8
9
10
11
12

Notice that this example use {{ and }} in line 7. Why?

Last Updated: Apr 26, 2020, 5:13 AM