[Mono-dev] 2D array representation change
robertj at gmx.net
Tue Mar 21 13:13:59 UTC 2017
On 20.03.2017 20:56, howard.rubin wrote:
> I'm using mono on Linux to call from C++ to C#. The 2D array representation
> returned from mono_method_full_name() to pass to mono_method_desc_new() has
> changed from int to int[,]
> MyNamespace.MyClass:MyFunction (int**)
> (assembly compiled with Mono C# compiler version 18.104.22.168)
> MyNamespace.MyClass:MyFunction (int*[,]*)
> (assembly compiled with Mono C# compiler version 22.214.171.124)
> 1. What version of mono did this change in?
> 2. How can I find out in C++ what version of mono a C# assembly was compiled
It seems to be caused by this commit (debug-helpers.c):
I.e., the representation of C# "int[,]" has been changed from
"int" to "int[,]".
You could try to determine at compile-time which mono runtime
are you building against (use "pkg-config --modversion mono-2")
and adjust the debug helper monikers using conditional compilation.
I'd rather propose a much easier approach: Look up the method
using mono_class_get_method_from_name ().
More information about the Mono-devel-list