C# how to put variable in string code example
Example 1: insert variables into string c#
string data = "Mr. Rogers";
var str = $"Hello {data}, how are you doing?";
Example 2: c# write variable in string
int age = 22;
Console.WriteLine($"Age: {age}");