title: C# Dictionary Map
body: <p>I have a dictionary:</p>
  <pre><code>   Dictionary&lt;ICD_Map2, string&gt; maps = new Dictionary&lt;ICD_Map2, string&gt;();
  
      public class ICD_Map2
      {
          public string call_type {get; set; }
          public string destination{get; set;} 
  
      }
  
  maps.Add(new ICD_Map2() {call_type = &quot;Mobile SMS&quot;, destination = &quot;Australia&quot;},&quot;Local Text&quot;);
  maps.Add(new ICD_Map2() {call_type = &quot;Mobile SMS&quot;, destination = &quot;International&quot;},&quot;International Text&quot;);
  </code></pre>
  <p>So what I want is, when I pass two variables:</p>
  <blockquote>
  <p>Case 1 variable1 = &quot;Mobile SMS&quot; &amp;&amp; variable2 = &quot;Australia&quot; I want a function to return &quot;Local Text&quot;</p>
  <p>Case 2 &quot;International Text&quot; depending on my input variables matching ICD_Map2 definition &quot;Mobile SMS&quot; and &quot;International&quot;.`</p>
  </blockquote>
  <p>How do I construct this mapping function to return the First of the set from a set ofresults (if there are more than one)? This is a very simplified example, I have over 100 mappings.</p>