I have 4 columns table defined as string ["Publication Title"]["Volume"] ["Pagination"] ["Publication Date"] I want to test all the conditions of these columns if they are NOT NULL then display only the row NOT NULL.
This is small piece of code that implements
if(row["Publication Title"]||row["Volume"]||row["Pagination"]||row["Publication Date"])
{
if (row["Publication Title"])
{
//traitement ;
var resultToDisplay =(row["Publication Title"];
if(row["Pagination"])
{
var resultToDisplay =row["Publication Title"]+","+row["Pagination"]
//traitement;
}
}
}
//condintion...
based on this concept How can I short my condition to something more optimized for the code and test all the conditions.
Thanks.
Aucun commentaire:
Enregistrer un commentaire