Check out example codes for "C# write a variable in string". It will help you in understanding the concepts better.

Code Example 1

// Method 1 Interpolation
//Interpolation Strings are strings that are interpertated at run time for your local vars
//This string must still use escape chars such as \\ and '{' char must be typed twice to show up.
int Num = 1;
String InterpolationString = $"The numer is {Num}. this way {{ can mark values"
//the intel on this web app has not incorperated this sense yet

// Method 2 Format 
string StringToFormat = "Name:{0} {1}, Location:{2}, Age:{3}";
string FormattedString = string.Format(StringToFormat, "Jim", "Bean", "EU", 1);
// You van add more variables to a sting by just adding {x} to root sting 
// format (where x is the variable spot in the input) and another var to the 
// of end params

// you can also add format specifications to a var.
int Num = 10;
// Output: 000A (Hexdecimal or base16 10)
//Here are some of the following
//"C" or "c" 	Currency
//"D" or "d" 	Decimal
//"E" or "e" 	Exponential (scientific)
//"F" or "f" 	Fixed-point
//"G" or "g" 	General
//"N" or "n" 	Number
//"P" or "p" 	Percent
//"X" or "x" 	Hexadecimal
//"R" or "r" 	Round-trip
//See for more

Code Example 2

int age = 22;

Console.WriteLine($"Age: {age}");

Learn ReactJs, React Native from