我正在学习LINQtoXML,需要找到具有特定属性的元素是否存在。目前我正在使用:XElementgroupCollectionXml=XElement.Parse(groupCollection.Xml);IEnumerablegroupFind=fromvwingroupCollectionXml.Elements("Group")where(string)vw.Attribute("Name")==groupNameselectvw;if(groupFind.Count()==0)returnfalse;elsereturntrue;我知道有一种更简洁的方法可以做到这一点,可能是