Hi,
I am using VS2012, C# and ASP.NET.
I have created a hashset and I want to compare with the names available in the hashset match with a datatable column.
I have tried the below code, but not sure how to compare the datatable column with the hashset
HashSet<string> tblListColDisplayName = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
StringBuilder stringbuilderobj = new StringBuilder();
foreach (ListItem item in myItems)
{
stringbuilderobj.Append(item["strName"].ToString().Trim.Append(",");
}
stringbuilderobj.Length--; // remove the last comma
tblListColDisplayName.Add(stringbuilderobj.ToString());
var requiredColumns = tblListColDisplayName; // This data contains "Mark", "John", "Wade"
//Compare the requiredcolumns with datatable column, if a column does not exist, return
How to compare hashset with the columns in da ...
Go to the complete details ...