See the question and my original answer on StackOverflow

You must do this:

var dataSetValues = dataSet.DoubleArray; // dataSetValues is dynamic
var result = ConvertDoubleArray((Array)(object)dataSetValues);

The reason is the 'dynamic' type of the DoubleArray (that was probably automatically defined in the interface when you added the COM reference). It's a super smart thing that tries to do the conversion from System.Double[*] to System.Double[] by itself, but it's not smart enough to do this (it can't read StackOverflow answers... yet)

So, you'll have to ask it to just pass the object 'as is', to be able to pass it directly to the CLR low-level cast, which can do System.Double[*] to Array w/o crashing. Once you have the Array, you can re-use the ConvertDoubleArray utility.