ref和泛型无关,ref表示函数体内对该参数的修改,会影响到外面
void Change(string s) {
s = "xyz";
}
void ChangeRef(ref string s) {
string s = "abc";
Change(s);
Console.Write(s); //abc
ChangeRef(s);
Console.Write(s); //xyz