Ok i dont even know if the title makes any sense, but i am having difficulty describing what i need to do. So take a look at the example plz.
I am doing this:
(SportsParent)JsonConvert.DeserializeObject<SportsParent>(jsonObj);
But what if i wanted to have the class name "SportsParent" stored in a string, and create a Type object from it. And then use that Type object for casting.
Something like that:
Type type = Type.GetType("myNanespace.SportsParent");
(type )JsonConvert.DeserializeObject<type >(jsonObj);
Thank you.