JoHecht
JoHecht
CC#
Created by JoHecht on 1/19/2023 in #help
String interpolation on an existing String
I receive a string out of a Database. Say like "Hello {Name}" which is safed in the variable x I know want to use string interpolation on that string I know this works
string Name = "Peter"
string hello = $"Hello {Name}";
string Name = "Peter"
string hello = $"Hello {Name}";
Result would be hello Peter What I want to do is this
string Name = "Peter"
string hello = $"x";
string Name = "Peter"
string hello = $"x";
With the same result Is this even possible?
6 replies