static void Main(string[] args) {List<string> list = new List<string>();list.Add("abc");ChangeOrNot(list); var query = from p in list select p; foreach (string l in query) { Console.WriteLine(l); }} private static void ChangeOrNot(List<string> list) { list.Add("def"); }輸出abc def,并沒有加ref關(guān)鍵字.求解原理.
泛型類型作為函數(shù)參數(shù)
阿波羅的戰(zhàn)車
2018-08-23 09:06:17