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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -