static void Main(string[] args) { var xmlConverter = new XMLFormat(); var adapter = new XMLtoJSON(xmlConverter); adapter.ConvertXmlToJson(); Console.ReadKey(); }
//The data of the XML is fed to private readonly variable from here. public XMLtoJSON(XMLFormat xmlFormat) { _xmlFormat = xmlFormat; }