using System;
using System.Collections.Generic;
using IntList = System.Collections.Generic.List<int>
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
IntList l = new IntList();
l.Add(1);
l.Add(2);
}
}
}
こんな事ができるとは知らなかった。ちょっと衝撃だ。そのソースファイル内のみ有効なので、完全に typedef の代わりという訳にはいかないが。
VB は更に強力だ。
プロジェクトでデフォルトインポートしておくとどこでも使える。