Marshalling C# Jagged Array to C++
问题 I'm trying to marshal a 2D C# jagged array ( double[][] jaggedArray ) to a C++ dll where i've specified the receiving variable to be a double** . However, i'm getting the message: There is no marshaling support for nested arrays. Short of flattening the jagged array is there a way to use jagged arrays from C# in a C++ dll? 回答1: Using low level Marshal class methods, it is possible to marshal any type to unmanaged memory. For example, for every double[] array in jaggedArray, allocate unmanaged