public static void RefMethod(ref int i) //参数使用了ref关键字 { i++; } public static void OutMethod(out int i) //参数使用了out关键字 { i = 0; //out参数规定,参数在方法体内必须被初始化。 i++; }
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3