How to know if DataTable is null or Empty

I have a situation where xaml is returning dataTable to the invoke method .
I want to check if dataTable is empty or null?
How can i check that.

Thanks

10 Likes

Hi,

The following expression will return true if the Datatable (dt) is either null or empty

dt Is Nothing OrElse Dt.Rows.Count = 0

example of usage :

image

Cheers

37 Likes

Thank you , it worked :+1:

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