Use a variable in C# path
<p>I need to save an .xml file in a specific location on a computer. But location could be changed based on selection of the user. </p>

<p>I can get user selection (from combobox) to the variable like this:</p>

<pre><code>location = (string)comboBox1.SelectedItem;
</code></pre>

<p>But I can’t use following command to store my file because of “%location%” part. It says “Could not find a part of the path” </p>

<pre><code>docSave.Save(@"C:\...\...\%location%\...\Information.xml");
</code></pre>

<p>Can anyone help me regarding that….?</p>

<p>Thank you.</p>
