c# format text code example Example: c# string formatting name = "Bob"; age = 27; info = $"Your name is {name} and you are {age} years old";