I have this XML document
<AdditionalParameters>
<PublishToPdf Type ="System.Boolean">False</PublishToPdf>
</AdditionalParameters>
in my code and I'm trying to build an array of arguments containing the <PublishToPdf>
node.
object test = (object) ((typeof(publishNode.Attributes["Type"].value)) publishNode.InnerText);
This breaks at compile time of course. I can't figure out how to cast the publishNode.InnerText('false')
to a runtime defined object of type specified in the XML file and store it in an object (which will conserve the type).
I've been searching for more than an hour, and I've seen such complex things and each different from the other. I can't tell what specifically is my problem.