title: calling methods on .net object from coldfusion
body: <p>I am trying to instantiate and call methods on a .net object created from a dll from coldfusion.  This works when I call methods with one or zero arguments but fails with -</p>
  
  <blockquote>
    <p>System.MissingMethodException: Could not find the generic method coldfusion2net.test.setvars</p>
  </blockquote>
  
  <p>when I try to call a method with more than one arg.  </p>
  
  <p>Here is my simple C# class:</p>
  
  <pre><code>namespace coldfusion2net
  {
      public class test
      {
          protected string myvar;
          protected string myvar2;
          public void setvars(string v, string v2) {
              myvar = v;
              myvar2 = v2;
          }
          public void setvar(string v) {
              myvar = v;
          }
          public string getvar(){
              return myvar;
          }
      }
  }
  </code></pre>
  
  <p>and here is my ColdFusion test:</p>
  
  <pre><code>&lt;cfset dll = ExpandPath('./coldfusion2net.dll')&gt;
  &lt;cfobject type=".NET" name="test" class="coldfusion2net.test" assembly="#dll#"&gt;
  &lt;cfset test.init()&gt;
  &lt;!--- object has been loaded ---&gt;
  &lt;cfdump var="#test#"&gt;
  &lt;!--- so far so good ---&gt;
  &lt;cfset test.setvar("foo")&gt;
  &lt;cfset s = test.getvar()&gt;
  &lt;cfoutput&gt;#s#&lt;/cfoutput&gt;
  &lt;!--- wtf??? ---&gt;
  &lt;cfset test.setvars("foo","bar")&gt;
  </code></pre>
  
  <p>To compile the dll, I am using visual studio 2010 targeting the .net 3.5 runtime (which is what we have on our servers).  I am using ColdFusion     <strong>8,0,0,176276</strong>    to try and load the dll.</p>
  
  <p>Has anyone else seen anything like this?  Am I doing something wrong?  Is this a CF bug?</p>
  
  <p>I looked in the article on the Adobe live docs on .NET Interoperability Limitations but the closest thing I found is "ColdFusion cannot determine the correct data type conversion if a method has multiple signatures that have the same number of parameters and differ only in the parameter data types".  This does not seem to be the problem here.</p>