NSoft.NFramework.Tools.TypeTool.SimpleClassName C# (CSharp) Method

SimpleClassName() public static method

System.Type.Name 값에서 Namespace를 뺀 class name 만을 뽑아낸다.
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;
        }