Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using System;
namespace ConsoleApplication1
class Program
static void Main(string[] args)
string name = "Valentino";
int age = 7;
var data1 = string.Format("name:{0}, age:{1}", name, age);
Console.WriteLine("classic string format - {0}", data1);
var data2 = $"name:{name}, age:{age}";
Console.WriteLine("string interpolation - {0}", data2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment