ふらっとC#,C♯,C#(初心者用) Part31
at TECH
720:デフォルトの名無しさん
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]);
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5377日前に更新/215 KB
担当:undef