NSoft.NFramework.Tools.TypeTool.IsSimpleType C# (CSharp) 메소드

IsSimpleType() 공개 정적인 메소드

간단한 수형인지 판단한다.
System.Type.IsPrimitive 를 이면 간단한 수형이고, stirng, Decimal, DateTime, DBNull 형식이면 SimpleType이라 규정한다.
public static IsSimpleType ( this type ) : bool
type this
리턴 bool
        public static bool IsSimpleType(this Type type) {
            if(type.IsPrimitive)
                return true;

            if(IsSameOrSubclassOf(type, typeof(string)))
                return true;

            if(IsSameOrSubclassOf(type, typeof(DateTime)))
                return true;

            if(IsSameOrSubclassOf(type, typeof(Decimal)))
                return true;

            if(IsSameOrSubclassOf(type, typeof(DBNull)))
                return true;

            return false;
        }