title: Get dictionary value by key
body: <p>How can I get the dictionary value by a key on a function?</p>
  <p>My function code (and the command I try doesn't work):</p>
  <pre><code>static void XML_Array(Dictionary&lt;string, string&gt; Data_Array)
  {
      String xmlfile = Data_Array.TryGetValue(&quot;XML_File&quot;, out value);
  }
  </code></pre>
  <p>My button code:</p>
  <pre><code>private void button2_Click(object sender, EventArgs e)
  {
      Dictionary&lt;string, string&gt; Data_Array = new Dictionary&lt;string, string&gt;();
      Data_Array.Add(&quot;XML_File&quot;, &quot;Settings.xml&quot;);
  
      XML_Array(Data_Array);
  }
  </code></pre>
  <p>I want on the <code>XML_Array</code> function the variable to be:</p>
  <pre><code>string xmlfile = &quot;Settings.xml&quot;:
  </code></pre>