2
select new FeedResource
{
Title = (string)details.Element("title"),
Host = (string)details.Element("link"),
Description = (string)details.Element("description"),
PublishedOn = (DateTime?)details.Element("pubDate"),
Generator = (string)details.Element("generator"),
Language = (string)details.Element("language")
}
里面添加的功能在上面的代码中,我想类型转换值传递给另一个函数, 例如何选择查询
Description = getValidDescription((string) details.Element("description"))
但我不能够实现,任何投入?
注:需要类型转换处理空值(即如果没有价值目前为“描述”它(的XElement)处理空完美
有什么错误 – itowlson 2009-12-15 03:47:10
尝试写getValidDescription(string)方法,一切似乎OK – LorenVS 2009-12-15 04:00:06
作为itowlson问,什么是错误的,因为不应该有一个问题与调用其他方法的方法你想要的,也许你还应该包含你的getValidDescription方法(或者至少是s ignature)。帮助我们帮助你... – Kamal 2009-12-15 04:34:55