Using .Net Core 2.0 / C# can you interpolate a string retrieved from a file? Here's an example of what I would like to do. My file contains {simpleString} which should be replaced with "Test Value".
string template = string.Empty;
string simpleString = "Test Value";
string interpolatedString = $"Name: {simpleString}";
//interpolatedString is now "Name: Test Value"
string filePath = Path.GetFullPath("Templates/ToEnrollee.html");
using (StreamReader reader = new StreamReader(filePath))
{
template = reader.ReadToEnd();
}
//I would like interpolation to take place here
string body = string.Format(template);