Explain this expression with examples

NOT String.IsNullOrEmpty(row(0).ToString) AND NOT String.IsNullOrWhiteSpace(row(0).ToString)

Hi @Gaurav07

You can check out their documentations here:

There are also examples on the documentations.

Thanks and regards! :slight_smile:

1 Like


NOT is used to reverse the condition into not exist.

String.IsNullOrEmpty is used to check the String against null (Nothing) and checks the Length against zero.

String.IsNullOrWhiteSpace is used to check the following:-

  1. Nothing: The String reference itself equals Nothing. This is another term for null.

  2. Empty: The String data is empty. IsNullOrWhiteSpace returns True in this case. This is not shown in the program.

  3. Whitespace only: The String data contains only whitespace. Any whitespace, including newlines and spaces, is considered.

Test contains the string “This is my computer”

Hi @Gaurav07

The method IsNullOrWhiteSpace covers IsNullOrEmpty , but it also returns true if the string contains white space.

cheers :smiley:

Happy learning :smiley: