DataTable distinct = dt.DefaultView.ToTable(true, "Subject, Name");
if (distinct.rows.count == dt.rows.count)
This code creates new datatable object from existing one, but only creates distinct rows. If the counts match, you didn't have any duplicates.
ToTable true parameter means take distinct and the string is a list of column names that are basis for distinct comparison
If this helps, please take time to accept the solution so others may find it. Thank you.