發布時間:2020-08-06 12:13 作者:獨孤劍 閱讀:1068
class Program { static void Main(string[] args) { string a = "001"; int b = 0; Console.WriteLine("call before"); Console.WriteLine("a: {0}", a); Console.WriteLine("b: {0}", b); TestRef(ref a, ref b); Console.WriteLine(""); Console.WriteLine("call after"); Console.WriteLine("a: {0}", a); Console.WriteLine("b: {0}", b); Console.Read(); } static void Test(ref string a, ref int b) { a = "100"; b = 100; } }
微信打賞, 微信掃一掃
支付寶打賞, 支付寶掃一掃
如果文章對您有幫助,歡迎給作者打賞