For each blank row

Hello,

I want to do a process on a datatable which contains blank rows for a certain column. Currently I have
For each row
IF
row(“Column1”).ToString=""

Is this correct?

1 Like

Hi @mzucker

It looks fine. You can improve the capability of this by using below command.

String.IsNullOrEmpty(row("Column").ToString)

3 Likes

thanks, what do you mean by capability?
what would be the difference between the two

Thanks!

1 Like

It will also check for Null values as well. So that it will return a true or false for both scenarios :slight_smile:

It’s good to have that when checking for empty strings

Great thanks I understand now

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.