How to get a Matrix from C++ to C# using the Moose Project

New user of Grasshoper here.

Brief description of my problem: I’m using GitHub - dalefugier/Moose: Demonstrates how to share a common library with both a C++ and a C# plug-in. and I can’t convert my ON_Matrix from C++ to a Matrix in C#.

If you are wondering why I am using this being new to grasshoper it is because it is for a university project and they want me to do this project using the Moose project. I know it’s easier to use C# but I can’t do it in this way.

After telling you this I will explain what im looking for: yesterday I asked about getting a list of points as input for a component How can I get a list as output in C#? - #3 by Carlos_Carrasco. After getting this list of points I want to iterate through the list to fill a matrix, but my problem is I’m not able to get the matrix from C++ to C# , I tried using from ON_Matrix (C++) class to Matrix class (C#), also I tried to make the matrix with ON_SimpleArray → SimpleArrayDouble but I’m not able to code something like SimpleArrayDouble(SimpleArrayDouble).
So if someone has worked with Moose or knows about this can help me I will appreciate it infinitely because this is breaking my head.

I leave you the screenshots of the code that I did:

This is my MooseCoreLib.cpp function that does “the work” of filling the matrix



And the grasshoper component

Thank you and sorry for the long post.