title: Is there any possible way of having an object and an array of objects with the same name and with the same class definition?
body: <p>I am retrieving data from a dynamically updating json. It contains an object of type X at some time, and an array of X type objects at some other time. I need a parent class Y that could work in any of the above situation. And also the object name: x remains the same.</p>
  
  <pre><code>class Y
  {
      public X x { get; set; }
      public X[] x { get; set; }
  }
  class X
  {
      public int a { get; set; }
  }
  </code></pre>
  
  <p>This shows an error: the type Y already contains a definition for x<br>
  Is there any possible way to do it??</p>