using System;
class Generic<T1, T2> {
}
class Test {
static void Main() {
Type t = typeof(Generic<int, string>);
Console.WriteLine(t);
Console.WriteLine(t.GetGenericTypeDefinition());
foreach (Type t2 in t.GetGenericArguments()) {
Console.WriteLine(t2);
}
}
}
/*
実行結果
Generic[System.Int32,System.String]
Generic
System.Int32
System.String
*/