I would like to make a function that converts a string to an object. In my case this is for IFC reading function, I have many functions to read different strings to <T>
Until now, I have something like that :
public void convertIfcCartesianPoint(string inputLine)
{
IfcCartesianPoint element = new IfcCartesianPoint(inputLine);
}
public void convertIfcDirection(string inputLine)
{
IfcDirection element = new IfcDirection(inputLine);
}
Concretely I would like to do something like that :
public void ConvertString(string ClassName,string inputLine)
{
ClassName element = new ClassName(inputLine);
}
So I just would launch the function like that :
this.ConvertToString("IfcCartesianPoint",inputLine);
this.ConvertToString("IfcDirection",inputLine);