public static object LoadByType(Type type) { try { if (type != null) { var ctor = type.GetConstructor(new Type[0]); if (ctor != null) { return ctor.Invoke(new object[0]); } } } catch (Exception) { } return null; }