public static void Readpath() { try { string text; using (StreamReader sr = new StreamReader(readPath, System.Text.Encoding.Default)) { text = sr.ReadToEnd().ToLower().Trim(); } if (text == "bin") { Bin bs = new Bin(); Menu menu = new Menu(bs); menu.ShowMenu(); } else if (text == "xml") { Xml xs = new Xml(); Menu menu = new Menu(xs); menu.ShowMenu(); } } catch (Exception e) { Console.WriteLine("Ошибка: " + e.Message); } }
public static void Main(string[] args) { XmlService xmlService = new XmlService(); Xml XmlObject = new Xml(xmlService.fileName); XmlObject.CreateXml(); XmlObject.navigatingXml(); XmlObject.AppendingChild(); }