08/10/07 17:27:13
>>717
public static void hoge(string[] s)
{
s = new[] { "c", "d" };
}
public static void hage(ref string[] s)
{
s = new[] { "e", "f" };
}
static void Main(string[] args)
{
string[] s = { "a", "b" };
Console.WriteLine("{0} {1}", s[0], s[1]);
hoge(s);
Console.WriteLine("{0} {1}", s[0], s[1]);
hage(ref s);
Console.WriteLine("{0} {1}", s[0], s[1]);
}