C# Language Simple Usage


Example

var name = "World";
var str = $"Hello, {name}!";
//str now contains: "Hello, World!";

Behind the scenes

Internally this

$"Hello, {name}!" 

Will be compiled to something like this:

string.Format("Hello, {0}!", name);