What’s a good way of doing string templating in .NET?

Here is the version for those of you who can use a new version of C#:

// add $ at start to mark string as template
var template = $"Your job finished at {FinishTime} and your file is available for download at {FileURL}."

In a line – this is now a fully supported language feature (string interpolation).

Leave a Comment