How to pass an integer array reference to managed C++ from C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cindy

    How to pass an integer array reference to managed C++ from C#

    I have created a managed C++ wrapper class to wrap the unmanaged C++ dll.
    The GUI is using C#. In C#, I want to pass an int array to my managed C++
    class to get the result back to C#. Something likes below
    In C#:
    public void FuncA()
    {
    int[] a;
    a=new int[5];
    a[0]=1;
    ...
    WrappedClass.Ge tIntegerValue(r ef a)
    }
    In C++:
    public:
    void WrapperClass::G etIntegerValue( int __gc* []);

    It cannot be compiled. Please help

Working...