title: Converting double?[ ] to object[ ] in c#
body: <p>I am using DotNet.Highcharts in my C# program. The data element for series  items requires an <code>object[]</code>. The data I’m using is coming from a LINQ method as shown below. The code below also converts the <code>double?[]</code> to a <code>List&lt;object&gt;</code> then to the desired <code>object[]</code>. </p>
  
  <pre><code>double?[] data = (from c in context.CTSeries
                   select c.CTDI).Take(1000).ToArray();
  
  List&lt;object&gt; dataList = new List&lt;object&gt;();
  
  foreach (double? ctdi in data)
  {
      dataList.Add( Convert.ChangeType(ctdi, typeof(Object)));
  }
  
  object[] dataArray = dataList.ToArray();
  return dataArray;
  </code></pre>
  
  <p>Is there a better/more efficient way of getting the <code>object[]</code> from a <code>double?[]</code>?</p>