title: XML-RPC.NET and C# Dynamic Types
body: <p>The Cook Computing blog has a post discussing how dynamics in .NET 4 could be used to create dynamic RPC calls. (Post: <a href="http://www.cookcomputing.com/blog/archives/000594.html" rel="nofollow">ALTERNATIVE SYNTAX FOR MEMBER CALLS ON C# DYNAMIC TYPES</a> )</p>
  
  <p>The post shows the following example:</p>
  
  <pre><code>using System.Dynamic;
  
  class XmlRpcClient : DynamicObject
  {
    string endpoint;
  
    public XmlRpcClient(string endpoint)
    {
      this.endpoint = endpoint;
    }
  
    public object Invoke(string methodName, object[] args)
    {
      return 5; // actually make call to XML-RPC endpoint here
    }
  
    public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, 
      out object result)
    {
      result = Invoke(binder.Name, args);
      return true;
    }
  }
  </code></pre>
  
  <p>The part I don't understand is the comment stating "actually make call to XML-RPC endpoint here". </p>
  
  <p>Is there a way to use the XML-RPC.NET library in the invoke method or would you need to make a HttpWebRequest call?</p>
  
  <p>Thanks</p>