You can use LINQ query to find the same value in columns and rows.
1. Check if an Entire Column Has the Same Value
Example:
Assume you have a DataTable named dt and want to check if the column named "ColumnName" has the same value:
(From row In dt.AsEnumerable()
Select row("ColumnName").ToString).Distinct().Count() = 1
2. Check if an Entire Row Has the Same Value
To check if all values in a specific row are the same:
Example:
Assume you want to check if the first row has the same value for all its columns:
dt.Rows(0).ItemArray.Distinct().Count() = 1
Thanks!!