using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ref_Example { class Program { public void _ref(ref int i) //参数为引用类型 { i++; Console.WriteLine("执行引用"); } static void Main() { Program p = new Program(); int j = 100; p._ref(ref j); //引用的使用 Console.WriteLine(j); } } }