Hello all I am trying to compare headers of two excel files dt1, dt2.
I am using below LINQ.
dt1.Columns.Cast(Of DataColumn)().Select(Function(c) c.ColumnName).SequenceEqual(dt2.Columns.Cast(Of DataColumn)().Select(Function(c) c.ColumnName))
But getting the error : If: Object reference not set to an instance of an object.
Can you guys check or give any alternative solution?
Data Validation.xaml (9.8 KB)