OurSonic.SonicLevels.getLevel C# (CSharp) Method

getLevel() private method

private getLevel ( string level ) : string
level string
return string
        public string getLevel(string level)
        {
            if (doc.Root.Attribute("Count") == null)
            {
                doc.Root.Add(new XAttribute("Count", 1));
            }
            else
            {
                doc.Root.Attribute("Count").SetValue(int.Parse(doc.Root.Attribute("Count").Value) + 1);
            }
            doc.Save(c);
            return File.ReadAllText(lvlDirectory + level + ".js");
        }