I have multiple words I want to replace with values, whats the best way to do this?
Example: This is what I have done but it feels and looks so wrong
If you're planning on having a dynamic number of replacements, which could change at any time, and you want to make it a bit cleaner, you could always do something like this:
// Define name/value pairs to be replaced.
var replacements = new Dictionary();
replacements.Add("", client.FullName);
replacements.Add("", event.EventDate.ToString());
// Replace
string s = "Dear , your booking is confirmed for the ";
foreach (var replacement in replacements)
{
s = s.Replace(replacement.Key, replacement.Value);
}