IsNothingOrEmpty

<Extension()> _
    Public Function IsNothingOrEmpty(ByRef dt As DataTable) As Boolean
        Dim result As Boolean = (dt Is Nothing)
        If Not result Then result = dt.Rows.Count = 0
        Return result
    End Function
Example:
Dim dt As DataTable = ...
If Not dt.IsNothingOrEmpty Then
   ....
End If

Description

Return if a datatable is nothing or if is empty.

Details

Double click on the code to select all.

 

;