class Program { static void Main(string[] args) { int test = 100; M1(ref test); //参数不加REF时,会直接输出100 加了REF会输出200 Console.WriteLine(test);//这样会直接输出100 } static int M1(ref int a) { return a = a + 100; } }