c# - Checking for Null in Linq to SQL query -
i have following code nested in loop reading excel rows, it's supposed read , house current row's cell values.
ienumerable<string> textvalues = cell in row.descendants<cell>() //where cell.cellvalue != null select (cell.datatype.hasvalue && cell.datatype == cellvalues.sharedstring ? sharedstring.childelements[int.parse(cell.cellvalue.innertext)].innertext : cell.cellvalue.innertext );
currently it's throwing null exceptions. set them empty string, rather skip them, still have can load object.
Comments
Post a Comment