Check if data table is Nothing or Null

What is the best way to check if a data table has been defined or not? I.e. whether the data table itself is Nothing or Null

You can check whether datatable contains rows and columns or not

Datatable.rows.count is greater than 0
Datatable.columns.count is greater than 0

Hi, I don’t want to check the contents of the table whether it is empty or not or whether it contains rows or columns, I want to check if the table itself is Nothing or Null

Use below code
Use if condition
IsNothing(dt)

True -> null
False-> not null

Regards,
Arivu

4 Likes