public static void LoadXML(XElement xe) { userFunctions.Clear(); nextIdentifier = 0; XElement element = xe.Element("functions"); foreach (var v in element.Elements()) { var uf = new UserFunction(); uf.LoadXML(v); userFunctions.Add(nextIdentifier.ToString(), uf); nextIdentifier++; } }