Hi There,
I have two forms, each with a public datatable declared in them. To spare you the details of why, I want to know how I can compare the two datatables to see if they are equal.
I need to know that all data in each datatable is exactly the same. I have tried the following, but to now avail:
the problem with this is that it is true for all datatables, even when they are not the same.
and...
but this is false for all datatables, even when they are the same.
How can I successfully compare two datables to define whether they are equal or not?
I can't use:
because it says that you can't compare reference types in this way, and, I can't use:
because it is false for every datatable even when they are the same.
Please response asap, your help with this will be much appreciated!
Thanks,
Michelle
I have two forms, each with a public datatable declared in them. To spare you the details of why, I want to know how I can compare the two datatables to see if they are equal.
I need to know that all data in each datatable is exactly the same. I have tried the following, but to now avail:
VB.NET:
if form1.datatable.tostring = form2.datatable.tostring then
and...
VB.NET:
if form1.datatable.select is form2.datatable.select then
How can I successfully compare two datables to define whether they are equal or not?
I can't use:
VB.NET:
if form1.datatable = form2.datatable then
VB.NET:
if form1.datatable is form2.datatable then
Please response asap, your help with this will be much appreciated!
Thanks,
Michelle