Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateInstance() [10/10]

static object System.Activator.CreateInstance ( Type type,
bool nonPublic,
bool wrapExceptions )
inlinestaticpackage

Definition at line 119 of file Activator.cs.

120 {
121 if ((object)type == null)
122 {
123 throw new ArgumentNullException("type");
124 }
125 if (!(type.UnderlyingSystemType is RuntimeType runtimeType))
126 {
127 throw new ArgumentException(SR.Arg_MustBeType, "type");
128 }
129 return runtimeType.CreateInstanceDefaultCtor(!nonPublic, wrapExceptions);
130 }

References System.SR.Arg_MustBeType, and System.type.