来来,看看这个:
using System;
class A
{
string s;
public void F(ref string a,ref string b)
{
s = "One";
a = "Two";
b = "Three";
Console.WriteLine("s:{0}",s);
Console.WriteLine("a:{0}",a);
Console.WriteLine("b:{0}",b);
}
public void G()
{
F(ref s,ref s);
}
}
public class B
{
public static void Main()
{
A a = new A();
a.G();
}
}