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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -