C#反映类型参数

示例

该typeof操作符对类型参数。

class NameGetter<T>
{
    public string GetTypeName()
    {
        return typeof(T).Name;
    }
}