using System; class Method // 字符串是特殊的引用类型,所以字符串参数的值并不会被方法体改变 ... { static void SetStr(string s) ...{ s = "987654321"; } static void Main() ...{ string s = "123456789"; SetStr(s); Console.Write(s); }} 字符串是特殊的引用类型,所以字符串参数的值并不会被方法体改变