Lets say that I have a string that is mostly complete. In the middle of it is an entry that is variable - for example:
string speech = @"I am very"variable"and I need some lighter clothes"
Assuming I don't want to create another string to handle that last part of that sentence, how do I place one of many words for "hot" in place of variable?
My pseudo theory would go something like this:
string speech = @"I am very " + &antonym + " and I need some lighter clothes";
public string putTheSentenceTogether(string antonym)
{
return speech(antonym);
}
Can this be done in C#? Or an any other way that doesn't require me to split speech up?