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")
}
In the above code i want to pass the type cast value to another function, Example
Description = getValidDescription((string) details.Element("description"))
but i am not able to achieve, any inputs?
Note : The type casting is required to handle null values (that is in case no value present for "description" it (XElement) handles null perfectly.