Shovan Saha

Shovan Saha

  • NA
  • 321
  • 91.8k

null/empty value problem

Sep 17 2017 12:47 PM
For any null/empty value this code does not work. Please help me.
 
string TotalQty = (Convert.ToInt32(_product.Where(x => x.Type.ToLower() == row.Cells[0].Value.ToString().ToLower()).Select(x => x.TotalQty).FirstOrDefault()) + Convert.ToInt32(row.Cells[3].Value.ToString())).ToString(); 

Answers (4)