title: Invoking WCF functions using Reflection
body: <p>I have a WCF application that is using <code>NetTcpBinding</code>. I want to invoke the functions in WCF service using <code>Methodbase.Invoke</code> from the <code>System.Reflection</code> namespace. In other words I want to Dynamically call a Function by passing a <code>String</code> as the Function name.</p>
  
  <p>Reflection works great for Web Service or a Windows application or any DLL or class. So there is certainly a way to do this for WCF but I am unable to find out how.</p>
  
  <p>I am getting the Assembly Name then it's type everything fine but as we cannot create an instance of the Interface class. I tried to open the WCF connection using the binding and tried to pass that object but it's throwing an exception as:</p>
  
  <p>"Object does not match target type."</p>
  
  <p>I have opened the connection and passed the object and type is of interface only. I don't know whether I'm trying the wrong thing or am using the wrong way. Any idea how I can accomplish this?</p>
  
  <p>The <code>NetTCPBinding</code> all are properly given while opening the connection. I am using WCF as a Windows Service using <code>NETTCPBinding</code>.</p>