title: Reflection failed for properties on anonymous types in Silverlight
body: <p>I'm using Silverlight 4 with VS 2010 and trying to do reflection on anonymous type and I got some "Attempt by method '...' to access method '...' failed.". I tried various workarounds for this but I couldn't find and simple ones.</p>
  
  <p><code>
          class.CallAnonymous("SimpleClass", "HelloFunc", new { strIn = "Boo" });</p>
  
  <pre><code>    public void CallAnonymous(string cName, string cAction, object anonymousParms)
      {
          Type anonymousType = anonymousParms.GetType();
  
          PropertyInfo[] props = anonymousType.GetProperties();
          ServiceParam serviceParam = new ServiceParam();
  
          foreach (var info in props)
          {
              string propertyName = info.Name;
              object propertyObj = info.GetValue(anonymousParms, null);
              // Throw the exception on PropertyInfo.GetValue()
  
              serviceParam.Add(propertyName, propertyObj);
          }
      }
  </code></pre>
  
  <p></code></p>