title: Is it possible to use object in web service?
body: <p>enter code hereI would like to send dynamic type with .asvc web service. I have one class with some properties. I would like to send any kind of object even class in this list. And cast back on client side.</p>
  
  <p>I mean I always want to use <code>SysResult</code> type. But sometimes with <code>List&lt;Apple&gt;</code>, sometimes <code>List&lt;Orrange&gt;</code> </p>
  
  <p>Like bellow</p>
  
  <pre><code>    [Serializable]
      public class SysResult
      {
          public int CRCResult;
          public long CRCTransactionId;
          public bool CRCStatus;
          public string CRCMessage;
          public List&lt;Anything&gt; ListObject;
      }
  </code></pre>
  
  <p>I've tried to use <code>object[]</code>, <code>Array</code>, <code>List&lt;object&gt;</code>, <code>dynamic</code> etc. But I am getting this error.
  "The underlying connection was closed: The connection was closed unexpectedly."</p>
  
  <p>By the way for all non-specific object types service referance class represents <code>object[]</code> type.</p>
  
  <pre><code>  [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
          public object[] ListObject {
              get {
                  return this.ListObjectField;
              }
              set {
                  if ((object.ReferenceEquals(this.ListObjectField, value) != true)) {
                      this.ListObjectField = value;
                      this.RaisePropertyChanged("ListObject");
                  }
              }
          }
  </code></pre>
  
  <p>Is there any way to send dynamic type? Or am I trying to do something totally wrong?</p>
  
  <p>Thanks in advance.</p>