I have DataTable with a primary key with multiple columns
dt.PrimaryKey = new DataColumn[] {dt.Columns["Name"], dt.Columns["Type"] };
Now I want to check if my DataTable dt contains (Adarsh, Developer)
I have to pass two values in Contains Method
I tried using the following which doesn't seem to work
DataRow dr = dt.Rows(e.RowIndex);
DataRow drNew = dt.NewRow();
drNew["Name"] = dr["Name"];
drNew["Type"] = dr["Type"];
drNew["Address"] = dr["Address"];
if(dt.Rows.Contains(drNew["Name"].ToString(), drNew["Type"].ToString())) //This gives me an error
{
}
Thank You in advance