NSoft.NFramework.Tools.TypeTool.IsInstantiatableType C# (CSharp) Метод

IsInstantiatableType() публичный статический Метод

인스턴스 생성을 할 수 있는 타입인가? 즉 new 로 인스턴스를 생성할 수 있는 형식인가?
public static IsInstantiatableType ( this type ) : bool
type this
Результат bool
        public static bool IsInstantiatableType(this Type type) {
            type.ShouldNotBeNull("type");

            if(type.IsAbstract || type.IsInterface || type.IsArray || type.IsGenericTypeDefinition || type == typeof(void))
                return false;

            if(HasDefaultConstructor(type) == false)
                return false;

            return true;
        }