Linq and converting to a type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CraigGRA

    Linq and converting to a type

    I am running a linq query against some data comming in as XML. I then
    cast the resultant field into an object.

    Sometimes when the XML is not valid (someone has sent a file that does
    not match the schema) it throws an exception.

    This only happens when i try to access any of the properties of the
    result of the query. (such as the count or itterate through it)

    Is there an easy way to see which "row" of the results are not to be
    cast ok (some sort of property)


    Craig
Working...