Core/CafeLib.Core/Support/Creator.cs
/// <summary>
/// Create instance of specified type.
/// </summary>
/// <param name="type">type object</param>
/// <param name="args">constructor arguments</param>
/// <returns>instance object</returns>
Create instance of specified type.
Create instance of specified type .
public static object CreateInstance(Type type, params object[] args)
        {
            var activator = type.FindConstructor(args);
            return activator?.Invoke(args);
        }
public static object CreateInstance ( Type type , params object [ ] args ) { var activator = type . FindConstructor ( args ) ; return activator ? . Invoke ( args ) ; }
Create instance of specified type.
Create instance of specified type .
None
type
Type
None
args
None