public static SimpleClassName ( this type ) : string | ||
type | this | 대상 인스턴스의 타입 객체 |
return | string |
public static string SimpleClassName(this Type type) {
if(type == null)
return string.Empty;
string name = type.Name;
int index = name.IndexOfAny(new[] { '<', '{', '`' });
if(index >= 0)
name = name.Substring(0, index);
return name;
}