I want to remove the first line:
!string.IsNullOrEmpty(cell.Text)
will this cause any issue?
I ran across this in some code:
if ((id % 2 == 0)
&& !string.IsNullOrEmpty(cell.Text)
&& !string.IsNullOrEmpty(cell.Text.Trim())
)
I think the first string.IsNullOrEmpty would return false on a string with spaces
and the line with Trim() takes care of that, so the first IsNullOrEmpty is useless
But before I remove the line without the trim I thought I'd run it by the group.
if cell.Text is null, you'd have an exception without that first check.