I have a requirement to concat two string values and these values should be placed between curly braces, I'm trying to define string format as a constant and passing the string values, I have tried many formats but always am getting Invalid Input Parameter exception. Is that possible to do the following using string formatter ? if then how ?
private const string formatString = "'{'{0}'}''{'{1}'}'";
string str1 = "John";
string str2 = "[email protected]";
string resultString = string.Format(formatString, str1, str2);
Expected Output
{John}{[email protected]}