- ふらっと C#,C♯,C#(初心者用) Part125 [無断転載禁止]©2ch.net
447 :デフォルトの名無しさん (ワッチョイ 377b-U3jc)[]:2016/11/14(月) 03:26:59.64 ID:OCTkBwGI0 - static void Swap<T>(ref T lhs, ref T rhs){
T temp; temp = lhs; lhs = rhs; rhs = temp; } 呼び出しは Swap<int>(ref a, ref b); 省略して Swap(ref a, ref b); これはダメか? これでもいいよな。 Swap( a, b);
|
|