title: Send custom data as object using WCF
body: <p>In my latest project, I wish to send custom data as an object using WCF. Reason for this is that I won't have to update each client when a new data class is introduced.
  However, when I try to send this data, it never arrives at the client side.</p>
  
  <p>To give a short example:
  A custom class:</p>
  
  <pre><code>[DataContract]
  public class MyData
       {
       [DataMember]
       public string Name { get ;set; }
       [DataMember]
       public id Value { get; set; }
  
       public MyData(string name, id value)
       {
       this.Name = name;
       this.Value = value;
       }
  }
  </code></pre>
  
  <p>When I want to send this to the client, I use:</p>
  
  <pre><code>object obj = new MyData("test",1);
  service.SendDataToClient(obj);
  </code></pre>
  
  <p>The client never receives this event from the service when I send it as object. However, when I send it as MyData instead of object, it works as it should. How can I send this as object?</p>