void 参照渡し(ref int[] data) { data = new int[] { 4, 5 }; }

int[] a = { 1, 2, 3 };
参照渡し(ref a);
出力(a);//{4, 5}が出力される

C#だとこんな感じ