/// <summary> /// Creates a new object using a base value (e.g. a string with its value). /// Normally primitives, enumerations and some value types can be instantiated this way. /// Also types with constructors having one argument can be instantiated. /// </summary> /// <param name="classType">Full class name of the object to be instantiated</param> /// <param name="baseValue">Value which is passed as argument to the constructor</param> /// <returns>New object, null if not possible</returns> public static object GetInstance(string classType, object baseValue) { return(ObjectSupport.GetInstance(ObjectSupport.GetType(classType), baseValue, null)); }
/// <summary> /// Creates a new object. /// Types with an argumentless constructor can be created this way /// </summary> /// <param name="classType">Full class name of the object to be instantiated</param> /// <returns>New object, null if not possible</returns> public static object GetInstance(string classType) { return(ObjectSupport.GetInstance(ObjectSupport.GetType(classType))); }