Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

函数参数 ref int[] 有问题 #279

Closed
cyecp opened this issue Jul 4, 2019 · 0 comments
Closed

函数参数 ref int[] 有问题 #279

cyecp opened this issue Jul 4, 2019 · 0 comments

Comments

@cyecp
Copy link

cyecp commented Jul 4, 2019

    public static void ArrayTest07()
    {
        int[,] a = new int[2, 3];
        a[0, 0] = 1; //ios il2cpp ipad test: invocation exception
        a[0, 0].ToString(); //unityeditor crash on windows pc test

        //下面这里跑不过
        var arr = new int[3];
        Func(ref arr);
        Console.WriteLine(arr[1]);
    }

    static void Func(ref int[] arr)
    {
        arr[1] = 2;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant