title: How can I Convert Class as IEnumerable?
body: <p>Is it possible to convert class as <code>IEnumerable</code>?</p>
  
  <pre><code> private SeriesMapping CreateSeriesMapping(string category, string value, string stackKey, CustomObject itemsSource)
      {
          var data= (IEnumerable)itemsSource;
          SeriesMapping successMapping = new SeriesMapping() { SeriesDefinition = new StackedBar100SeriesDefinition() { StackGroupName = stackKey } };
          successMapping.ItemMappings.Add(new ItemMapping(category, DataPointMember.XCategory));
          successMapping.ItemMappings.Add(new ItemMapping(value, DataPointMember.YValue));
          successMapping.ItemsSource = data; // after conversion i did not any data.
  
       // successMapping.ItemsSource = itemsSource; //if i use this i did not get error But while opening the chart Null Reference exception is coming. 
          return successMapping;
      }
  </code></pre>
  
  <p>that's way  i am thinking that class object....</p>