using System;
using System.Xml;
using System.Collections.Generic;
public class Program
{
public static void Main()
Dictionary<string, string> xmlElements = new Dictionary<string, string>();
XmlDocument doc = new XmlDocument();
doc.Load("MCSSettings.xml");
foreach (XmlElement e in doc.SelectSingleNode("/settings/tcpServer"))
if (e.NodeType != XmlNodeType.Comment)
xmlElements.Add(e.Name, e.FirstChild.Value);
Console.WriteLine(int.Parse(xmlElements["legacyPort"]).ToString("0"));
xmlElements.Clear();
}