反映型別引數

typeof 運算子處理型別引數。

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