System.SecurityUtils.SecureCreateInstance C# (CSharp) Method

SecureCreateInstance() static private method

This helper method provides safe access to Activator.CreateInstance. Set allowNonPublic to true if you want non public ctors to be used.
static private SecureCreateInstance ( Type type, object args ) : object
type Type
args object
return object
        internal static object SecureCreateInstance(Type type, object[] args)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            return Activator.CreateInstance(type, args);
        }

Same methods

SecurityUtils::SecureCreateInstance ( Type type ) : object