在以下查询中:
var foundNode3 = (from e in root.Descendants(df + "Inv")
where e.Descendants(df + "Document").Any(item =>(string)item.Element(df + "InvS").Value == "N")
select e.Element(df + "DocT").Element(df + "EndT").Value);
输出:23.98、12.34、24.4...
现在做 Sum()
var foundNode3 = (from e in root.Descendants(df + "Inv")
where e.Descendants(df + "Document").Any(item =>(string)item.Element(df + "InvS").Value == "N")
select double.Parse(e.Element(df + "DocT").Element(df + "EndT").Value)).Sum();
FormatException:输入格式错误的字符串
有人可以帮助我吗?