using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
public static class Program
public static void Main()
var span = testMulti.AsSpan<double>();
var singleArray = new double[span.Length];
span.CopyTo(singleArray.AsSpan());
public static Span<T> AsSpan<T>(this Array array)
return MemoryMarshal.CreateSpan(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), array.Length);