Get Object of unknown type with unknown parameters from string
I have an abstract parent class with several child classes, each child class has an export method that returns a string that hold the data of the instance of the subclass in the form of:
[SUBCLASS_NAME] | [PARAM#1] | [PARAM#2] | [PARAM#3]...
and so on for all of the parameters, these parameters can be Enum values (The Enums are located in the parent class), strings, integers, and possibly in the future, doubles / floats.
I want to write a static method in the parent class that will return an instance of the child class defined at the beginning of the input string, that will then use the remaining data in the string as parameters.
Currently I lack the understanding of types as well as the GetConstructor method, and also the understanding to assemble the type list properly, I've read the official documentation but it was a little too complex to grasp, could somebody help me figure out how to achieve this?
Attached is my current attempt.
[SUBCLASS_NAME] | [PARAM#1] | [PARAM#2] | [PARAM#3]...
and so on for all of the parameters, these parameters can be Enum values (The Enums are located in the parent class), strings, integers, and possibly in the future, doubles / floats.
I want to write a static method in the parent class that will return an instance of the child class defined at the beginning of the input string, that will then use the remaining data in the string as parameters.
Currently I lack the understanding of types as well as the GetConstructor method, and also the understanding to assemble the type list properly, I've read the official documentation but it was a little too complex to grasp, could somebody help me figure out how to achieve this?
Attached is my current attempt.
