运行不出来啊,代码有什么问题么
using System;
using System.Linq;
using System.Xml.Linq;
namespace shiyan7_2
{
class Program
{
static void Main(string[] args)
{
XElement books=XElement.Parse(
@"<books>
<book>
<author>mr.li</author>
<title>c#</title>
<publisher>中国人民出版社</publisher>
</book>
<book>
<author>mr.wang</author>
<title>c++</title>
<publisher>北京大学出版社</publisher>
</book>
<book>
<author>mr.zhou</author>
<title>sql数据库</title>
<publisher>清华大学出版社</publisher>
</book>
<book>
<author>mr.zhao</author>
<title>js</title>
<publisher>中国人民出版社</publisher>
</book>
</books>");
var items = from book in books.Elements("book")
where (string)book.Element("autuor") == "mr.zhou"
select book.Element("title");
foreach (var title in items)
Console.WriteLine(title.Value);
}
}
}