反映类型参数

typeof 运算符处理类型参数。

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