Good day Coders
I would like to know is there a way of matching values from a list collection to a data table row. Currently I have this, that doesn't work. Ref_Number is the list collection and dtRefNum is the DataTable row
int count = Ref_Number.Count > dtRefNum.Rows.Count ? dtRefNum.Rows.Count : Ref_Number.Count;
for (int i = 0; i < count; i++ )
{
if (Ref_Number[i].ToString().Trim().Contains(dtRefNum.Rows[i].ToString().Trim()))
{
var refnum = Ref_Number[i].ToString().Trim();
var fsdfsdf = dtRefNum.ToString().Trim();
}
else if (Ref_Number[i].ToString().Trim() == dtRefNum.Rows[i].ToString().Trim())
{
}
You may want to try this,