'Insert variables into interpolated string for XML SOAP request in C#
Hi i'm trying to insert another variable into a string, the ones that comes in the dictionary variable works fine, but i need to insert another upper that section, how can i do it?
public static string SendRequest(Dictionary<string, string> parameters)
<soap:Body>
<tem:Section1>
<tem:token>
**INSERT ANOTHER VARIABLE HERE**
</tem:token>
<tem:Section2>
<{0} xmlns=""{1}"">{2}</{0}>
</tem:Section2>
</tem:Section1>
</soap:Body>
string parms = string.Join(string.Empty, parameters.Select(kv => String.Format("<{0}>{1}</{0}>", kv.Key, kv.Value)).ToArray());
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
