69 {
70 if ((
object)
type ==
null)
71 {
72 throw new ArgumentNullException("type");
73 }
75 {
76 throw new NotSupportedException(SR.NotSupported_CreateInstanceWithTypeBuilder);
77 }
79 {
80 bindingAttr |= BindingFlags.Instance | BindingFlags.Public |
BindingFlags.CreateInstance;
81 }
82 if (activationAttributes != null && activationAttributes.Length != 0)
83 {
84 throw new PlatformNotSupportedException(SR.NotSupported_ActivAttr);
85 }
86 if (
type.UnderlyingSystemType is RuntimeType runtimeType)
87 {
88 return runtimeType.CreateInstanceImpl(bindingAttr, binder, args,
culture);
89 }
91 }